From fc5dbc6003b8e37b1d6a548bed0fddbdfaa62476 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 26 Mar 2020 15:39:56 +0400 Subject: [PATCH] Use animated emoji size for the Dice. --- .../SourceFiles/history/view/media/history_view_sticker.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp b/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp index 00e2b9bce..2270fe15b 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp @@ -59,18 +59,18 @@ bool Sticker::isEmojiSticker() const { void Sticker::initSize() { _size = _document->dimensions; - if (isEmojiSticker()) { + if (isEmojiSticker() || _diceIndex >= 0) { constexpr auto kIdealStickerSize = 512; const auto zoom = GetEmojiStickerZoom(&_document->session()); const auto convert = [&](int size) { return int(size * st::maxStickerSize * zoom / kIdealStickerSize); }; _size = QSize(convert(_size.width()), convert(_size.height())); + [[maybe_unused]] bool result = readyToDrawLottie(); } else { _size = DownscaledSize( _size, { st::maxStickerSize, st::maxStickerSize }); - [[maybe_unused]] bool result = readyToDrawLottie(); } }