From 61292557bf34bbcf323935ef9d9b7fb9a48590a9 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Mon, 1 Jun 2020 12:48:42 +0300 Subject: [PATCH] Fixed top scroll of compose controls on change of height. --- .../history/view/history_view_scheduled_section.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp b/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp index 9af4373563..bb5626944b 100644 --- a/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp +++ b/Telegram/SourceFiles/history/view/history_view_scheduled_section.cpp @@ -146,7 +146,11 @@ void ScheduledWidget::setupComposeControls() { _composeControls->height( ) | rpl::start_with_next([=] { + const auto wasMax = (_scroll->scrollTopMax() == _scroll->scrollTop()); updateControlsGeometry(); + if (wasMax) { + listScrollTo(_scroll->scrollTopMax()); + } }, lifetime()); _composeControls->cancelRequests(