From bacc30e296f197f5ed5d96bf0e1048b669b76e4c Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 6 Oct 2022 17:05:23 +0400 Subject: [PATCH] Fix custom emoji interaction with other animations. --- Telegram/SourceFiles/data/stickers/data_custom_emoji.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Telegram/SourceFiles/data/stickers/data_custom_emoji.cpp b/Telegram/SourceFiles/data/stickers/data_custom_emoji.cpp index 3ab4fc3304..e5023c4ff5 100644 --- a/Telegram/SourceFiles/data/stickers/data_custom_emoji.cpp +++ b/Telegram/SourceFiles/data/stickers/data_custom_emoji.cpp @@ -721,6 +721,14 @@ void CustomEmojiManager::repaintLater( Ui::CustomEmoji::RepaintRequest request) { auto &bunch = _repaints[request.duration]; if (bunch.when < request.when) { + if (bunch.when > 0) { + for (const auto &already : bunch.instances) { + if (already.get() == instance) { + // Still waiting for full bunch repaint, don't bump. + return; + } + } + } bunch.when = request.when; } bunch.instances.emplace_back(instance);