diff --git a/Telegram/SourceFiles/ui/chat/chats_filter_tag.cpp b/Telegram/SourceFiles/ui/chat/chats_filter_tag.cpp index 3e799aa02..aa1b4bff2 100644 --- a/Telegram/SourceFiles/ui/chat/chats_filter_tag.cpp +++ b/Telegram/SourceFiles/ui/chat/chats_filter_tag.cpp @@ -29,14 +29,15 @@ QImage ChatsFilterTag(QString roundedText, QColor color, bool active) { auto emojiLength = 0; if (const auto emoji = Ui::Emoji::Find(ch, end, &emojiLength)) { const auto factor = style::DevicePixelRatio(); - emojiReplacements.emplace_back( - Ui::Emoji::SinglePixmap( + emojiReplacements.push_back({ + .pixmap = Ui::Emoji::SinglePixmap( emoji, st::normalFont->height * factor).scaledToHeight( roundedFont->ascent * factor, Qt::SmoothTransformation), - ch - roundedText.constData(), - emojiLength); + .from = int(ch - roundedText.constData()), + .length = emojiLength, + }); ch += emojiLength; } else { ch++;