mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Started Lottie::CacheState class.
This commit is contained in:
@@ -1100,11 +1100,8 @@ std::unique_ptr<Lottie::Animation> LottieFromDocument(
|
||||
data,
|
||||
filepath,
|
||||
box);
|
||||
} else if (!data.isEmpty()) {
|
||||
return Lottie::FromData(data);
|
||||
} else {
|
||||
return Lottie::FromFile(filepath);
|
||||
}
|
||||
return Lottie::FromContent(data, filepath);
|
||||
}
|
||||
|
||||
} // namespace Stickers
|
||||
|
@@ -1368,9 +1368,9 @@ void StickersListWidget::setupLottie(Set &set, int section, int index) {
|
||||
auto &sticker = set.stickers[index];
|
||||
const auto document = sticker.document;
|
||||
|
||||
sticker.animated = document->data().isEmpty()
|
||||
? Lottie::FromFile(document->filepath())
|
||||
: Lottie::FromData(document->data());
|
||||
sticker.animated = Lottie::FromContent(
|
||||
document->data(),
|
||||
document->filepath());
|
||||
const auto animation = sticker.animated.get();
|
||||
|
||||
animation->updates(
|
||||
|
Reference in New Issue
Block a user