mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Use empty Storage::Cache::Key as nullopt.
This commit is contained in:
@@ -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,
|
||||
|
@@ -141,7 +141,7 @@ public:
|
||||
|
||||
const StorageImageLocation &location() override;
|
||||
void refreshFileReference(const QByteArray &data) override;
|
||||
std::optional<Storage::Cache::Key> cacheKey() override;
|
||||
Storage::Cache::Key cacheKey() override;
|
||||
void setDelayedStorageLocation(
|
||||
const StorageImageLocation &location) override;
|
||||
void performDelayedLoad(Data::FileOrigin origin) override;
|
||||
@@ -256,8 +256,8 @@ const StorageImageLocation &ImageSource::location() {
|
||||
void ImageSource::refreshFileReference(const QByteArray &data) {
|
||||
}
|
||||
|
||||
std::optional<Storage::Cache::Key> ImageSource::cacheKey() {
|
||||
return std::nullopt;
|
||||
Storage::Cache::Key ImageSource::cacheKey() {
|
||||
return {};
|
||||
}
|
||||
|
||||
void ImageSource::setDelayedStorageLocation(
|
||||
|
Reference in New Issue
Block a user