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

Fix animated stickers with wrong dimensions.

This commit is contained in:
John Preston
2020-07-17 08:13:45 +04:00
parent f64f1ea62e
commit 9463bbd266
5 changed files with 20 additions and 11 deletions

View File

@@ -573,8 +573,11 @@ void DocumentData::setattributes(
});
}
if (type == StickerDocument
&& (!GoodStickerDimensions(dimensions.width(), dimensions.height())
|| (size > Storage::kMaxStickerBytesSize))) {
&& ((size > Storage::kMaxStickerBytesSize)
|| (!sticker()->animated
&& !GoodStickerDimensions(
dimensions.width(),
dimensions.height())))) {
type = FileDocument;
_additional = nullptr;
}