diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 0039f26144554e..20a08def80e089 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -212,6 +212,7 @@ For license and copyright information please follow this link: #include #include +#include namespace { @@ -386,7 +387,12 @@ HistoryWidget::HistoryWidget( _scroll->setOverscrollBg(QColor(0, 0, 0, 0)); _scroll->setOverscrollEdges( [=] { return historyLoadedAtTop(); }, - [=] { return historyLoadedAtBottom(); }); + [=] { + return Core::App().settings().pullToNextChannel() + && _history + && _history->peer->isBroadcast() + && historyLoadedAtBottom(); + }); _scroll->geometryChanged( ) | rpl::on_next(crl::guard(_list, [=] { _list->onParentGeometryChanged(); @@ -11119,6 +11125,9 @@ void HistoryWidget::synteticScrollToY(int y) { if (_scroll->scrollTop() == y) { visibleAreaUpdated(); } else { + if (QScroller::hasScroller(_scroll.data())) { + QScroller::scroller(_scroll.data())->stop(); + } _scroll->scrollToY(y); } _synteticScrollEvent = false;