2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-04 00:15:42 +00:00

Set correct cache tags for different file types.

This commit is contained in:
John Preston
2018-08-29 00:09:55 +03:00
parent e2f08d4161
commit 55f60866cb
9 changed files with 119 additions and 31 deletions

View File

@@ -129,7 +129,9 @@ void Uploader::uploadMedia(const FullMsgId &msgId, const SendMediaReady &media)
if (document->saveToCache()) {
Auth().data().cache().put(
document->cacheKey(),
base::duplicate(media.data));
Storage::Cache::Database::TaggedValue(
base::duplicate(media.data),
document->cacheTag()));
}
}
if (!media.file.isEmpty()) {
@@ -156,7 +158,9 @@ void Uploader::upload(
if (document->saveToCache()) {
Auth().data().cache().put(
document->cacheKey(),
base::duplicate(file->content));
Storage::Cache::Database::TaggedValue(
base::duplicate(file->content),
document->cacheTag()));
}
}
if (!file->filepath.isEmpty()) {