mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Update API scheme on layer 142: Premium stickers.
This commit is contained in:
@@ -465,7 +465,8 @@ bool DocumentData::checkWallPaperProperties() {
|
||||
void DocumentData::updateThumbnails(
|
||||
const InlineImageLocation &inlineThumbnail,
|
||||
const ImageWithLocation &thumbnail,
|
||||
const ImageWithLocation &videoThumbnail) {
|
||||
const ImageWithLocation &videoThumbnail,
|
||||
bool isPremiumSticker) {
|
||||
if (!inlineThumbnail.bytes.isEmpty()
|
||||
&& _inlineThumbnailBytes.isEmpty()) {
|
||||
_inlineThumbnailBytes = inlineThumbnail.bytes;
|
||||
@@ -475,6 +476,11 @@ void DocumentData::updateThumbnails(
|
||||
_flags &= ~Flag::InlineThumbnailIsPath;
|
||||
}
|
||||
}
|
||||
if (isPremiumSticker) {
|
||||
_flags |= Flag::PremiumSticker;
|
||||
} else {
|
||||
_flags &= ~Flag::PremiumSticker;
|
||||
}
|
||||
Data::UpdateCloudFile(
|
||||
_thumbnail,
|
||||
thumbnail,
|
||||
@@ -511,6 +517,10 @@ bool DocumentData::isPatternWallPaperSVG() const {
|
||||
return isWallPaper() && hasMimeType(qstr("application/x-tgwallpattern"));
|
||||
}
|
||||
|
||||
bool DocumentData::isPremiumSticker() const {
|
||||
return (_flags & Flag::PremiumSticker);
|
||||
}
|
||||
|
||||
bool DocumentData::hasThumbnail() const {
|
||||
return _thumbnail.location.valid();
|
||||
}
|
||||
|
Reference in New Issue
Block a user