2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +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

@@ -442,12 +442,17 @@ bool DocumentData::checkWallPaperProperties() {
}
void DocumentData::updateThumbnails(
const QByteArray &inlineThumbnailBytes,
const InlineImageLocation &inlineThumbnail,
const ImageWithLocation &thumbnail,
const ImageWithLocation &videoThumbnail) {
if (!inlineThumbnailBytes.isEmpty()
if (!inlineThumbnail.bytes.isEmpty()
&& _inlineThumbnailBytes.isEmpty()) {
_inlineThumbnailBytes = inlineThumbnailBytes;
_inlineThumbnailBytes = inlineThumbnail.bytes;
if (inlineThumbnail.isPath) {
_flags |= Flag::InlineThumbnailIsPath;
} else {
_flags &= ~Flag::InlineThumbnailIsPath;
}
}
Data::UpdateCloudFile(
_thumbnail,