2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 07:56:03 +00:00

Fix caching for large sticker area.

This commit is contained in:
John Preston
2019-06-27 18:57:32 +02:00
parent 808583c5ae
commit 4a7b5a8e01
11 changed files with 80 additions and 33 deletions

View File

@@ -1049,7 +1049,10 @@ QSize MediaPreviewWidget::currentDimensions() const {
void MediaPreviewWidget::setupLottie() {
Expects(_document != nullptr);
_lottie = Lottie::FromContent(_document->data(), _document->filepath());
_lottie = Lottie::FromContent(
_document->data(),
_document->filepath(),
Lottie::FrameRequest{ currentDimensions() * cIntRetinaFactor() });
_lottie->updates(
) | rpl::start_with_next_error([=](Lottie::Update update) {