From 75773f1982521cb230d06c7e8128530c77120884 Mon Sep 17 00:00:00 2001 From: gearonixx Date: Wed, 15 Jul 2026 21:13:47 +0300 Subject: [PATCH 1/2] Fixed scroll overshoot at the bottom of chat history. --- Telegram/SourceFiles/history/history_widget.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 0039f26144554e..6af168d945e135 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -386,7 +386,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(); From 18ed743ada7a0063e4bd1f31561b17767ea84c67 Mon Sep 17 00:00:00 2001 From: gearonixx Date: Wed, 15 Jul 2026 20:53:45 +0300 Subject: [PATCH 2/2] Fixed scrollbar flicker on history preload with QScroller. --- Telegram/SourceFiles/history/history_widget.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 6af168d945e135..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 { @@ -11124,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;