2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

Prepare lottie animations caching.

This commit is contained in:
John Preston
2019-06-26 12:01:04 +02:00
parent f20d9395d1
commit 35bc2cc2a5
17 changed files with 148 additions and 40 deletions

View File

@@ -1101,7 +1101,7 @@ std::shared_ptr<::Media::Streaming::Reader> Session::documentStreamedReader(
return nullptr;
}
auto result = std::make_shared<::Media::Streaming::Reader>(
this,
&cacheBigFile(),
std::move(loader));
if (!PruneDestroyedAndSet(_streamedReaders, document, result)) {
_streamedReaders.emplace_or_assign(document, result);