Fix reactions layout for large emoji messages.

This commit is contained in:
John Preston 2022-12-22 10:43:28 +04:00
parent b3858d5d97
commit 98af2d3006

View file

@ -508,12 +508,23 @@ auto Message::takeReactionAnimations()
QSize Message::performCountOptimalSize() { QSize Message::performCountOptimalSize() {
const auto item = data(); const auto item = data();
const auto markup = item->inlineReplyMarkup(); const auto markup = item->inlineReplyMarkup();
const auto reactionsKey = [&] {
return embedReactionsInBottomInfo()
? 0
: embedReactionsInBubble()
? 1
: 2;
};
const auto oldKey = reactionsKey();
refreshIsTopicRootReply(); refreshIsTopicRootReply();
validateText(); validateText();
validateInlineKeyboard(markup); validateInlineKeyboard(markup);
updateViewButtonExistence(); updateViewButtonExistence();
refreshTopicButton(); refreshTopicButton();
updateMediaInBubbleState(); updateMediaInBubbleState();
if (oldKey != reactionsKey()) {
refreshReactions();
}
refreshRightBadge(); refreshRightBadge();
refreshInfoSkipBlock(); refreshInfoSkipBlock();