diff options
author | John Preston <johnprestonmail@gmail.com> | 2021-02-17 19:15:49 +0400 |
---|---|---|
committer | John Preston <johnprestonmail@gmail.com> | 2021-02-17 19:15:49 +0400 |
commit | baccec623d45dbfd1132d5f808192f0f3ad87647 (patch) | |
tree | 9a06669c6be5efb92ed94cb4925f93c89166fd05 /Telegram | |
parent | 093d89db83669a244f84b99c447e013eb58cb4ba (diff) |
Allow opening large (> 512px) stickers in media viewer.
Diffstat (limited to 'Telegram')
-rw-r--r-- | Telegram/SourceFiles/history/view/media/history_view_sticker.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp b/Telegram/SourceFiles/history/view/media/history_view_sticker.cpp index 442575dbc5..802d8c0dc0 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<DocumentOpenClickHandler>( _data, _parent->data()->fullId()); |