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

Add support for gzip-ed animated stickers.

This commit is contained in:
John Preston
2019-05-16 18:44:52 +03:00
parent 973c3f8838
commit 4ab3c2dfcb
5 changed files with 59 additions and 5 deletions

View File

@@ -554,7 +554,8 @@ void DocumentData::setattributes(
void DocumentData::validateLottieSticker() {
if (type == FileDocument
&& (_filename == qstr("animation.json")
&& (_filename.endsWith(qstr(".tgs"))
|| _filename == qstr("animation.json")
|| ((_filename.size() == 9 || _filename.size() == 10)
&& _filename.endsWith(qstr(".json"))
&& QRegularExpression("^\\d+\\.json$").match(_filename).hasMatch()))) {