From 0f4aadddfcad384408396d8ebd7a141b96fdce3a Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 20 Sep 2024 16:59:57 +0300 Subject: [PATCH] Fixed display of corner status of video in sponsored messages. --- .../SourceFiles/history/view/media/history_view_gif.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp index 29cf6593e..f3de7fe3d 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_gif.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_gif.cpp @@ -388,6 +388,9 @@ bool Gif::downloadInCorner() const { } bool Gif::autoplayEnabled() const { + if (_realParent->isSponsored()) { + return true; + } return Data::AutoDownload::ShouldAutoPlay( _data->session().settings().autoDownload(), _realParent->history()->peer, @@ -689,7 +692,9 @@ void Gif::draw(Painter &p, const PaintContext &context) const { } if (!unwrapped && !skipDrawingSurrounding) { - if ((!isRound || !inWebPage) && !_realParent->isSponsored()) { + const auto sponsoredSkip = !_data->isVideoFile() + && _realParent->isSponsored(); + if ((!isRound || !inWebPage) && !sponsoredSkip) { drawCornerStatus(p, context, QPoint()); } } else if (!skipDrawingSurrounding) {