2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Load and show image previews in pinned bar.

This commit is contained in:
John Preston
2020-10-12 16:24:45 +03:00
parent 9b4b15ee6d
commit 37fb94cbfb
9 changed files with 136 additions and 15 deletions

View File

@@ -1266,6 +1266,15 @@ Image *DocumentData::getReplyPreview(Data::FileOrigin origin) {
return _replyPreview->image(origin);
}
bool DocumentData::replyPreviewLoaded() const {
if (!hasThumbnail()) {
return true;
} else if (!_replyPreview) {
return false;
}
return _replyPreview->loaded();
}
StickerData *DocumentData::sticker() const {
return (type == StickerDocument)
? static_cast<StickerData*>(_additional.get())