From 88dab47d2c58e0811594a614653627d6ddcbe87f Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Thu, 21 Mar 2024 20:17:33 +0300 Subject: [PATCH] Changed behavior to open section with scheduled messages at top. --- .../history/view/history_view_scheduled_section.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp b/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp index 59ee93ae99..188d113384 100644 --- a/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp +++ b/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp @@ -1154,7 +1154,9 @@ Context ScheduledWidget::listContext() { } bool ScheduledWidget::listScrollTo(int top, bool syntetic) { - top = std::clamp(top, 0, _scroll->scrollTopMax()); + top = (top == ScrollMax && syntetic) + ? 0 + : std::clamp(top, 0, _scroll->scrollTopMax()); if (_scroll->scrollTop() == top) { updateInnerVisibleArea(); return false;