2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Show inline path thumbnails for stickers.

This commit is contained in:
John Preston
2021-07-02 13:13:48 +03:00
parent f09b91ebb5
commit 4124c2eb57
21 changed files with 355 additions and 38 deletions

View File

@@ -171,13 +171,16 @@ public:
[[nodiscard]] int videoThumbnailByteSize() const;
void updateThumbnails(
const QByteArray &inlineThumbnailBytes,
const InlineImageLocation &inlineThumbnail,
const ImageWithLocation &thumbnail,
const ImageWithLocation &videoThumbnail);
[[nodiscard]] QByteArray inlineThumbnailBytes() const {
return _inlineThumbnailBytes;
}
[[nodiscard]] bool inlineThumbnailIsPath() const {
return (_flags & Flag::InlineThumbnailIsPath);
}
void clearInlineThumbnailBytes() {
_inlineThumbnailBytes = QByteArray();
}
@@ -257,6 +260,7 @@ private:
DownloadCancelled = 0x10,
LoadedInMediaCache = 0x20,
HasAttachedStickers = 0x40,
InlineThumbnailIsPath = 0x80,
};
using Flags = base::flags<Flag>;
friend constexpr bool is_flag_type(Flag) { return true; };