From 4e52da91c75a7604558c715179bd72355692816e Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 5 Jul 2019 19:47:27 +0200 Subject: [PATCH] Fix animation stopping in chat. --- Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp | 3 +++ Telegram/SourceFiles/history/history_widget.cpp | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp index 67e215693..8f661eb1c 100644 --- a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp +++ b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp @@ -232,6 +232,9 @@ void TabbedPanel::otherLeave() { void TabbedPanel::hideFast() { if (isHidden()) return; + if (_selector && !_selector->isHidden()) { + _selector->beforeHiding(); + } _hideTimer.cancel(); _hiding = false; _a_opacity.stop(); diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 32c28423a..c0f4306a9 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -1892,6 +1892,9 @@ void HistoryWidget::updateControlsVisibility() { updateHistoryDownVisibility(); updateUnreadMentionsVisibility(); if (!_history || _a_show.animating()) { + if (_tabbedPanel) { + _tabbedPanel->hideFast(); + } hideChildren(); return; } @@ -2926,6 +2929,9 @@ void HistoryWidget::showAnimated( _topShadow->setVisible(params.withTopBarShadow ? false : true); _cacheOver = App::main()->grabForShowAnimation(params); + if (_tabbedPanel) { + _tabbedPanel->hideFast(); + } hideChildren(); if (params.withTopBarShadow) _topShadow->show();