2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Use rpl in some widgets and effects.

This commit is contained in:
John Preston
2017-09-13 19:57:44 +03:00
parent 21d136e224
commit c302219f9e
120 changed files with 2119 additions and 671 deletions

View File

@@ -243,9 +243,9 @@ void StickersBox::prepare() {
preloadArchivedSets();
}
setNoContentMargin(true);
_tabs->setSectionActivatedCallback([this] {
switchTab();
});
_tabs->sectionActivated()
| rpl::on_next([this](int) { switchTab(); })
| rpl::start(lifetime());
refreshTabs();
}
if (_installed.widget() && _section != Section::Installed) _installed.widget()->hide();
@@ -1532,7 +1532,9 @@ void StickersBox::Inner::setRemovedSets(const Stickers::Order &removed) {
}
}
void StickersBox::Inner::setVisibleTopBottom(int visibleTop, int visibleBottom) {
void StickersBox::Inner::visibleTopBottomUpdated(
int visibleTop,
int visibleBottom) {
_visibleTop = visibleTop;
_visibleBottom = visibleBottom;
updateScrollbarWidth();