View some more files as stickers.

This commit is contained in:
John Preston 2019-05-13 00:27:16 +03:00
parent 642deecbbb
commit 61b6effccc

View file

@ -553,7 +553,11 @@ void DocumentData::setattributes(
}
void DocumentData::validateLottieSticker() {
if (type == FileDocument && _filename == qstr("animation.json")) {
if (type == FileDocument
&& (_filename == qstr("animation.json")
|| ((_filename.size() == 9 || _filename.size() == 10)
&& _filename.endsWith(qstr(".json"))
&& QRegularExpression("^\\d+\\.json$").match(_filename).hasMatch()))) {
type = StickerDocument;
_additional = std::make_unique<StickerData>();
dimensions = QSize(512, 512);