From 98af2d3006b1bc16b51d00e406e556af884f26c8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 22 Dec 2022 10:43:28 +0400 Subject: [PATCH] Fix reactions layout for large emoji messages. --- .../SourceFiles/history/view/history_view_message.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Telegram/SourceFiles/history/view/history_view_message.cpp b/Telegram/SourceFiles/history/view/history_view_message.cpp index 33d58e952..13812ade7 100644 --- a/Telegram/SourceFiles/history/view/history_view_message.cpp +++ b/Telegram/SourceFiles/history/view/history_view_message.cpp @@ -508,12 +508,23 @@ auto Message::takeReactionAnimations() QSize Message::performCountOptimalSize() { const auto item = data(); const auto markup = item->inlineReplyMarkup(); + const auto reactionsKey = [&] { + return embedReactionsInBottomInfo() + ? 0 + : embedReactionsInBubble() + ? 1 + : 2; + }; + const auto oldKey = reactionsKey(); refreshIsTopicRootReply(); validateText(); validateInlineKeyboard(markup); updateViewButtonExistence(); refreshTopicButton(); updateMediaInBubbleState(); + if (oldKey != reactionsKey()) { + refreshReactions(); + } refreshRightBadge(); refreshInfoSkipBlock();