Added clearing of message sending animations on escape from section.

This commit is contained in:
23rd 2022-02-11 02:57:13 +03:00 committed by John Preston
parent cf5f5f75bc
commit 9d164dc33c
4 changed files with 9 additions and 0 deletions

View file

@ -1988,6 +1988,7 @@ void HistoryWidget::showHistory(
}
clearHighlightMessages();
controller()->sendingAnimation().clear();
hideInfoTooltip(anim::type::instant);
if (_history) {
if (_peer->id == peerId && !reload) {

View file

@ -324,6 +324,7 @@ RepliesWidget::~RepliesWidget() {
_history->owner().sendActionManager().repliesPainterRemoved(
_history,
_rootId);
controller()->sendingAnimation().clear();
}
void RepliesWidget::orderWidgets() {

View file

@ -260,4 +260,9 @@ bool MessageSendingAnimationController::hasAnimatedMessage(
return _processing.contains(item);
}
void MessageSendingAnimationController::clear() {
_itemSendPending.clear();
_processing.clear();
}
} // namespace Ui

View file

@ -40,6 +40,8 @@ public:
[[nodiscard]] bool hasLocalMessage(MsgId msgId) const;
[[nodiscard]] bool hasAnimatedMessage(not_null<HistoryItem*> item) const;
void clear();
private:
const not_null<Window::SessionController*> _controller;