From 34f6c6b23fdf7e305f5c685414cdc706472ddb8a Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 15 Mar 2022 17:33:23 +0400 Subject: [PATCH] Fix video message frame request. Fixes #24190. --- .../SourceFiles/history/view/media/history_view_gif.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp index a43fb709c..36dc888f9 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp @@ -358,6 +358,9 @@ void Gif::draw(Painter &p, const PaintContext &context) const { usex = width() - usew; } } + if (isUnwrapped()) { + accumulate_min(usew, painth); + } if (rtl()) usex = width() - usex - usew; QRect rthumb(style::rtlrect(usex + paintx, painty, usew, painth, width())); @@ -844,6 +847,9 @@ TextState Gif::textState(QPoint point, StateRequest request) const { usex = width() - usew; } } + if (isUnwrapped()) { + accumulate_min(usew, painth); + } if (rtl()) usex = width() - usex - usew; if (via || reply || forwarded) {