mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-30 22:25:12 +00:00
Animated stickers proof of concept.
This commit is contained in:
@@ -533,6 +533,7 @@ void DocumentData::setattributes(
|
||||
}, [&](const MTPDdocumentAttributeHasStickers &data) {
|
||||
});
|
||||
}
|
||||
validateLottieSticker();
|
||||
if (type == StickerDocument) {
|
||||
if (dimensions.width() <= 0
|
||||
|| dimensions.height() <= 0
|
||||
@@ -551,6 +552,14 @@ void DocumentData::setattributes(
|
||||
}
|
||||
}
|
||||
|
||||
void DocumentData::validateLottieSticker() {
|
||||
if (type == FileDocument && _filename == qstr("animation.json")) {
|
||||
type = StickerDocument;
|
||||
_additional = std::make_unique<StickerData>();
|
||||
dimensions = QSize(512, 512);
|
||||
}
|
||||
}
|
||||
|
||||
bool DocumentData::checkWallPaperProperties() {
|
||||
if (type == WallPaperDocument) {
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user