2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 15:35:51 +00:00

Use empty Storage::Cache::Key as nullopt.

This commit is contained in:
John Preston
2020-05-20 16:28:18 +04:00
parent 581a21dbd9
commit fb322b5fc5
20 changed files with 71 additions and 68 deletions

View File

@@ -1162,7 +1162,7 @@ auto LottieFromDocument(
if (const auto baseKey = document->bigFileBaseCacheKey()) {
return LottieCachedFromContent(
std::forward<Method>(method),
*baseKey,
baseKey,
keyShift,
&document->session(),
Lottie::ReadContent(data, filepath),
@@ -1239,7 +1239,7 @@ bool HasLottieThumbnail(
if (!media->loaded()) {
return false;
}
return document->bigFileBaseCacheKey().has_value();
return document->bigFileBaseCacheKey().valid();
}
return false;
}
@@ -1269,7 +1269,7 @@ std::unique_ptr<Lottie::SinglePlayer> LottieThumbnail(
};
return LottieCachedFromContent(
method,
*baseKey,
baseKey,
uint8(sizeTag),
&document->session(),
content,