diff --git a/Telegram/SourceFiles/boxes/language_box.cpp b/Telegram/SourceFiles/boxes/language_box.cpp index 110787f3b..d0b9768f4 100644 --- a/Telegram/SourceFiles/boxes/language_box.cpp +++ b/Telegram/SourceFiles/boxes/language_box.cpp @@ -1143,7 +1143,7 @@ void LanguageBox::keyPressEvent(QKeyEvent *e) { return Ui::ScrollToRequest(-1, -1); }(); if (selected.ymin >= 0 && selected.ymax >= 0) { - onScrollToY(selected.ymin, selected.ymax); + scrollToY(selected.ymin, selected.ymax); } } diff --git a/Telegram/SourceFiles/boxes/peer_list_box.cpp b/Telegram/SourceFiles/boxes/peer_list_box.cpp index bf1917776..90b77e56e 100644 --- a/Telegram/SourceFiles/boxes/peer_list_box.cpp +++ b/Telegram/SourceFiles/boxes/peer_list_box.cpp @@ -138,12 +138,12 @@ void PeerListBox::prepare() { _select->finishAnimating(); Ui::SendPendingMoveResizeEvents(_select); _scrollBottomFixed = true; - onScrollToY(0); + scrollToY(0); } content()->scrollToRequests( ) | rpl::start_with_next([this](Ui::ScrollToRequest request) { - onScrollToY(request.ymin, request.ymax); + scrollToY(request.ymin, request.ymax); }, lifetime()); if (_init) { @@ -168,7 +168,7 @@ void PeerListBox::keyPressEvent(QKeyEvent *e) { } void PeerListBox::searchQueryChanged(const QString &query) { - onScrollToY(0); + scrollToY(0); content()->searchQueryChanged(query); } @@ -244,7 +244,7 @@ void PeerListBox::peerListSetForeignRowChecked( } void PeerListBox::peerListScrollToTop() { - onScrollToY(0); + scrollToY(0); } void PeerListBox::peerListSetSearchMode(PeerListSearchMode mode) { diff --git a/Telegram/SourceFiles/boxes/peer_lists_box.cpp b/Telegram/SourceFiles/boxes/peer_lists_box.cpp index 7311c00b5..4a476a4e3 100644 --- a/Telegram/SourceFiles/boxes/peer_lists_box.cpp +++ b/Telegram/SourceFiles/boxes/peer_lists_box.cpp @@ -158,7 +158,7 @@ void PeerListsBox::prepare() { content->scrollToRequests( ) | rpl::start_with_next([=](Ui::ScrollToRequest request) { const auto skip = content->y(); - onScrollToY( + scrollToY( skip + request.ymin, (request.ymax >= 0) ? (skip + request.ymax) : request.ymax); }, lifetime()); @@ -181,7 +181,7 @@ void PeerListsBox::prepare() { _select->finishAnimating(); Ui::SendPendingMoveResizeEvents(_select); _scrollBottomFixed = true; - onScrollToY(0); + scrollToY(0); } if (_init) { @@ -256,7 +256,7 @@ void PeerListsBox::keyPressEvent(QKeyEvent *e) { } void PeerListsBox::searchQueryChanged(const QString &query) { - onScrollToY(0); + scrollToY(0); for (const auto &list : _lists) { list.content->searchQueryChanged(query); } @@ -343,7 +343,7 @@ void PeerListsBox::Delegate::peerListSetForeignRowChecked( } void PeerListsBox::Delegate::peerListScrollToTop() { - _box->onScrollToY(0); + _box->scrollToY(0); } void PeerListsBox::Delegate::peerListSetSearchMode(PeerListSearchMode mode) { diff --git a/Telegram/SourceFiles/boxes/share_box.cpp b/Telegram/SourceFiles/boxes/share_box.cpp index 0a5827971..8769f16fb 100644 --- a/Telegram/SourceFiles/boxes/share_box.cpp +++ b/Telegram/SourceFiles/boxes/share_box.cpp @@ -553,7 +553,7 @@ void ShareBox::createButtons() { } void ShareBox::applyFilterUpdate(const QString &query) { - onScrollToY(0); + scrollToY(0); _inner->updateFilter(query); } @@ -624,7 +624,7 @@ void ShareBox::selectedChanged() { } void ShareBox::scrollTo(Ui::ScrollToRequest request) { - onScrollToY(request.ymin, request.ymax); + scrollToY(request.ymin, request.ymax); //auto scrollTop = scrollArea()->scrollTop(), scrollBottom = scrollTop + scrollArea()->height(); //auto from = scrollTop, to = scrollTop; //if (scrollTop > top) { diff --git a/Telegram/SourceFiles/boxes/stickers_box.cpp b/Telegram/SourceFiles/boxes/stickers_box.cpp index af4177140..3a4eaca8b 100644 --- a/Telegram/SourceFiles/boxes/stickers_box.cpp +++ b/Telegram/SourceFiles/boxes/stickers_box.cpp @@ -408,7 +408,7 @@ StickersBox::StickersBox( , _megagroupSet(megagroup) { _installed.widget()->scrollsToY( ) | rpl::start_with_next([=](int y) { - onScrollToY(y); + scrollToY(y); }, lifetime()); } @@ -786,7 +786,7 @@ void StickersBox::switchTab() { session().api().updateMasks(); } if (_tab == newTab) { - onScrollToY(0); + scrollToY(0); return; } @@ -808,7 +808,7 @@ void StickersBox::switchTab() { _unreadBadge->raise(); _tab->widget()->show(); rebuildList(); - onScrollToY(_tab->getScrollTop()); + scrollToY(_tab->getScrollTop()); setInnerVisible(true); auto nowCache = grabContentCache(); auto nowIndex = _tab->index(); diff --git a/Telegram/SourceFiles/ui/boxes/country_select_box.cpp b/Telegram/SourceFiles/ui/boxes/country_select_box.cpp index ffeee6c02..13d0a811f 100644 --- a/Telegram/SourceFiles/ui/boxes/country_select_box.cpp +++ b/Telegram/SourceFiles/ui/boxes/country_select_box.cpp @@ -135,7 +135,7 @@ void CountrySelectBox::prepare() { _inner->mustScrollTo( ) | rpl::start_with_next([=](ScrollToRequest request) { - onScrollToY(request.ymin, request.ymax); + scrollToY(request.ymin, request.ymax); }, lifetime()); } @@ -167,7 +167,7 @@ void CountrySelectBox::resizeEvent(QResizeEvent *e) { } void CountrySelectBox::applyFilterUpdate(const QString &query) { - onScrollToY(0); + scrollToY(0); _inner->updateFilter(query); } diff --git a/Telegram/lib_ui b/Telegram/lib_ui index d6cdc810c..4ba28e2fe 160000 --- a/Telegram/lib_ui +++ b/Telegram/lib_ui @@ -1 +1 @@ -Subproject commit d6cdc810c456d902b6f1398f96b197dfc8ffdf19 +Subproject commit 4ba28e2fec2ab86fb539a4cfe08b9bd1803f8fcf