2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

Use improved rpl::start().

This commit is contained in:
John Preston
2017-09-18 20:04:45 +03:00
parent ee9763c98f
commit 766e7dadb1
31 changed files with 145 additions and 179 deletions

View File

@@ -347,12 +347,11 @@ TabbedSelector::TabbedSelector(QWidget *parent, not_null<Window::Controller*> co
}));
Auth().api().stickerSetInstalled()
| rpl::on_next([this](uint64 setId) {
| rpl::start([this](uint64 setId) {
_tabsSlider->setActiveSection(static_cast<int>(SelectorTab::Stickers));
stickers()->showStickerSet(setId);
_showRequests.fire({});
})
| rpl::start(lifetime());
}, lifetime());
// setAttribute(Qt::WA_AcceptTouchEvents);
setAttribute(Qt::WA_OpaquePaintEvent, false);
@@ -608,8 +607,7 @@ void TabbedSelector::createTabsSlider() {
_tabsSlider->setActiveSectionFast(static_cast<int>(_currentTabType));
_tabsSlider->sectionActivated()
| rpl::on_next([this](int) { switchTab(); })
| rpl::start(lifetime());
| rpl::start([this](int) { switchTab(); }, lifetime());
_tabsSlider->resizeToWidth(width());
_tabsSlider->moveToLeft(0, 0);