diff --git a/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp b/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp index 95faad6e7d..2ce4f9c79e 100644 --- a/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp +++ b/Telegram/SourceFiles/history/view/history_view_emoji_interactions.cpp @@ -266,12 +266,18 @@ void EmojiInteractions::paint(QPainter &p) { play.framesCount = information.framesCount; play.frameRate = information.frameRate; } - if (play.frame + 1 == play.framesCount) { + const auto rect = computeRect( + play.view, + play.premium).translated(play.shift); + if (play.started && !play.frame) { play.finished = true; + _updateRequests.fire_copy(rect); + continue; + } else if (play.frame > 0) { + play.started = true; } - const auto rect = computeRect(play.view, play.premium); p.drawImage( - QRect(rect.topLeft() + play.shift, frame.image.size() / factor), + QRect(rect.topLeft(), frame.image.size() / factor), frame.image); play.lottie->markFrameShown(); } diff --git a/Telegram/SourceFiles/history/view/history_view_emoji_interactions.h b/Telegram/SourceFiles/history/view/history_view_emoji_interactions.h index 3dd4f297a9..e3871b54d1 100644 --- a/Telegram/SourceFiles/history/view/history_view_emoji_interactions.h +++ b/Telegram/SourceFiles/history/view/history_view_emoji_interactions.h @@ -52,6 +52,7 @@ private: int framesCount = 0; int frameRate = 0; bool premium = false; + bool started = false; bool finished = false; }; struct Delayed {