2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Allow loading lottie animations from memory.

This commit is contained in:
John Preston
2019-05-10 18:47:48 +03:00
parent 707aa88974
commit 642deecbbb
3 changed files with 14 additions and 5 deletions

View File

@@ -51,7 +51,11 @@ std::unique_ptr<Animation> FromFile(const QString &path) {
if (content.isEmpty()) {
return nullptr;
}
return std::make_unique<Lottie::Animation>(content);
return FromData(content);
}
std::unique_ptr<Animation> FromData(const QByteArray &data) {
return std::make_unique<Lottie::Animation>(data);
}
Animation::Animation(const QByteArray &content) {