From e2acab67e1daa88a744729a9e1f85feab87b3b7f Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Tue, 29 Jul 2025 13:53:28 +0300 Subject: [PATCH] Fixed support of covers for documents in pinned bar and reply bar. --- Telegram/SourceFiles/data/data_document.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Telegram/SourceFiles/data/data_document.cpp b/Telegram/SourceFiles/data/data_document.cpp index c6befff047..bbb5ae1058 100644 --- a/Telegram/SourceFiles/data/data_document.cpp +++ b/Telegram/SourceFiles/data/data_document.cpp @@ -1429,6 +1429,17 @@ Image *DocumentData::getReplyPreview( Data::FileOrigin origin, not_null context, bool spoiler) { + if (v::is(origin.data)) { + if (const auto item = _owner->message( + v::get(origin.data))) { + if (const auto cover = LookupVideoCover(this, item)) { + return cover->getReplyPreview( + std::move(origin), + context, + spoiler); + } + } + } if (!hasThumbnail()) { return nullptr; } else if (!_replyPreview) {