diff --git a/Telegram/SourceFiles/history/history_top_bar_widget.cpp b/Telegram/SourceFiles/history/history_top_bar_widget.cpp index 6046103aa6..6eb8395ab9 100644 --- a/Telegram/SourceFiles/history/history_top_bar_widget.cpp +++ b/Telegram/SourceFiles/history/history_top_bar_widget.cpp @@ -439,11 +439,16 @@ void HistoryTopBarWidget::updateControlsGeometry() { updateMembersShowArea(); } +void HistoryTopBarWidget::finishAnimating() { + _selectedShown.finish(); + updateControlsVisibility(); +} + void HistoryTopBarWidget::setAnimationMode(bool enabled) { if (_animationMode != enabled) { _animationMode = enabled; setAttribute(Qt::WA_OpaquePaintEvent, !_animationMode); - _selectedShown.finish(); + finishAnimating(); updateControlsVisibility(); } } diff --git a/Telegram/SourceFiles/history/history_top_bar_widget.h b/Telegram/SourceFiles/history/history_top_bar_widget.h index d7abcc4c13..f2904f72af 100644 --- a/Telegram/SourceFiles/history/history_top_bar_widget.h +++ b/Telegram/SourceFiles/history/history_top_bar_widget.h @@ -48,6 +48,7 @@ public: }; void updateControlsVisibility(); + void finishAnimating(); void showSelected(SelectedState state); rpl::producer membersShowAreaActive() const { return _membersShowAreaActive.events(); diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index c8e5f9260d..36650d71a3 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -3118,7 +3118,7 @@ void HistoryWidget::showAnimated( _cacheUnder = params.oldContentCache; show(); - _topBar->updateControlsVisibility(); + _topBar->finishAnimating(); historyDownAnimationFinish(); unreadMentionsAnimationFinish(); _topShadow->setVisible(params.withTopBarShadow ? false : true); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index d540ae1cab..21f88e2a3d 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -657,8 +657,8 @@ bool MainWidget::setForwardDraft(PeerId peerId, const SelectedItemSet &items) { if (_history->peer() == peer) { _history->cancelReply(); } - Ui::showPeerHistory(peer, ShowAtUnreadMsgId); _history->onClearSelected(); + Ui::showPeerHistory(peer, ShowAtUnreadMsgId); return true; }