diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 7b8a7d9cc..41ea4e6e3 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -1988,6 +1988,7 @@ void HistoryWidget::showHistory( } clearHighlightMessages(); + controller()->sendingAnimation().clear(); hideInfoTooltip(anim::type::instant); if (_history) { if (_peer->id == peerId && !reload) { diff --git a/Telegram/SourceFiles/history/view/history_view_replies_section.cpp b/Telegram/SourceFiles/history/view/history_view_replies_section.cpp index c8356bbc6..eeb56f75f 100644 --- a/Telegram/SourceFiles/history/view/history_view_replies_section.cpp +++ b/Telegram/SourceFiles/history/view/history_view_replies_section.cpp @@ -324,6 +324,7 @@ RepliesWidget::~RepliesWidget() { _history->owner().sendActionManager().repliesPainterRemoved( _history, _rootId); + controller()->sendingAnimation().clear(); } void RepliesWidget::orderWidgets() { diff --git a/Telegram/SourceFiles/ui/effects/message_sending_animation_controller.cpp b/Telegram/SourceFiles/ui/effects/message_sending_animation_controller.cpp index 07dcc639b..1ac9c7e7d 100644 --- a/Telegram/SourceFiles/ui/effects/message_sending_animation_controller.cpp +++ b/Telegram/SourceFiles/ui/effects/message_sending_animation_controller.cpp @@ -260,4 +260,9 @@ bool MessageSendingAnimationController::hasAnimatedMessage( return _processing.contains(item); } +void MessageSendingAnimationController::clear() { + _itemSendPending.clear(); + _processing.clear(); +} + } // namespace Ui diff --git a/Telegram/SourceFiles/ui/effects/message_sending_animation_controller.h b/Telegram/SourceFiles/ui/effects/message_sending_animation_controller.h index 7d51c616e..0e8bbfdaa 100644 --- a/Telegram/SourceFiles/ui/effects/message_sending_animation_controller.h +++ b/Telegram/SourceFiles/ui/effects/message_sending_animation_controller.h @@ -40,6 +40,8 @@ public: [[nodiscard]] bool hasLocalMessage(MsgId msgId) const; [[nodiscard]] bool hasAnimatedMessage(not_null item) const; + void clear(); + private: const not_null _controller;