From baccec623d45dbfd1132d5f808192f0f3ad87647 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 17 Feb 2021 19:15:49 +0400 Subject: [PATCH] Allow opening large (> 512px) stickers in media viewer. --- .../SourceFiles/history/view/media/history_view_sticker.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp b/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp index 442575dbc..802d8c0dc 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp @@ -274,8 +274,13 @@ void Sticker::refreshLink() { StickerSetBox::Show(App::wnd()->sessionController(), document); }); } else if (sticker + && (_data->dimensions.width() > kStickerSideSize + || _data->dimensions.height() > kStickerSideSize) && !_parent->data()->isSending() && !_parent->data()->hasFailed()) { + // In case we have a .webp file that is displayed as a sticker, but + // that doesn't fit in 512x512, we assume it may be a regular large + // .webp image and we allow to open it in media viewer. _link = std::make_shared( _data, _parent->data()->fullId());