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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user