2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-22 02:07:24 +00:00

Fixed support of covers for documents in pinned bar and reply bar.

This commit is contained in:
23rd 2025-07-29 13:53:28 +03:00 committed by John Preston
parent 095b171db3
commit e2acab67e1

View File

@ -1429,6 +1429,17 @@ Image *DocumentData::getReplyPreview(
Data::FileOrigin origin, Data::FileOrigin origin,
not_null<PeerData*> context, not_null<PeerData*> context,
bool spoiler) { bool spoiler) {
if (v::is<Data::FileOriginMessage>(origin.data)) {
if (const auto item = _owner->message(
v::get<FullMsgId>(origin.data))) {
if (const auto cover = LookupVideoCover(this, item)) {
return cover->getReplyPreview(
std::move(origin),
context,
spoiler);
}
}
}
if (!hasThumbnail()) { if (!hasThumbnail()) {
return nullptr; return nullptr;
} else if (!_replyPreview) { } else if (!_replyPreview) {