From ba6373a0aebf639befcae0d0cfc3e6472143629e Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 20 Mar 2020 00:41:21 +0400 Subject: [PATCH] Fix filter icon panel wrong hiding. --- Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp | 1 + Telegram/SourceFiles/ui/filter_icon_panel.cpp | 4 ++-- Telegram/SourceFiles/ui/filter_icon_panel.h | 1 - 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp index b5b24688c..8fba46c57 100644 --- a/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp +++ b/Telegram/SourceFiles/chat_helpers/tabbed_panel.cpp @@ -280,6 +280,7 @@ void TabbedPanel::hideByTimerOrLeave() { void TabbedPanel::prepareCacheFor(bool hiding) { if (_a_opacity.animating()) { + _hiding = hiding; return; } diff --git a/Telegram/SourceFiles/ui/filter_icon_panel.cpp b/Telegram/SourceFiles/ui/filter_icon_panel.cpp index 0748d2e93..9bb41c3a5 100644 --- a/Telegram/SourceFiles/ui/filter_icon_panel.cpp +++ b/Telegram/SourceFiles/ui/filter_icon_panel.cpp @@ -325,6 +325,7 @@ void FilterIconPanel::hideByTimerOrLeave() { void FilterIconPanel::prepareCacheFor(bool hiding) { if (_a_opacity.animating()) { + _hiding = hiding; return; } @@ -404,7 +405,7 @@ void FilterIconPanel::hideAnimated() { } void FilterIconPanel::toggleAnimated() { - if (isHidden() || _hiding || _hideAfterSlide) { + if (isHidden() || _hiding) { showAnimated(); } else { hideAnimated(); @@ -421,7 +422,6 @@ void FilterIconPanel::hideFinished() { void FilterIconPanel::showAnimated() { _hideTimer.cancel(); - _hideAfterSlide = false; showStarted(); } diff --git a/Telegram/SourceFiles/ui/filter_icon_panel.h b/Telegram/SourceFiles/ui/filter_icon_panel.h index 1606166a8..44b4f6c1a 100644 --- a/Telegram/SourceFiles/ui/filter_icon_panel.h +++ b/Telegram/SourceFiles/ui/filter_icon_panel.h @@ -77,7 +77,6 @@ private: Ui::Animations::Simple _a_show; bool _hiding = false; - bool _hideAfterSlide = false; QPixmap _cache; Ui::Animations::Simple _a_opacity; base::Timer _hideTimer;