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:
parent
095b171db3
commit
e2acab67e1
@ -1429,6 +1429,17 @@ Image *DocumentData::getReplyPreview(
|
||||
Data::FileOrigin origin,
|
||||
not_null<PeerData*> context,
|
||||
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()) {
|
||||
return nullptr;
|
||||
} else if (!_replyPreview) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user