2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-04 00:25:17 +00:00

Keep track of fully cached media files.

This commit is contained in:
John Preston
2019-05-31 19:45:03 +03:00
parent 2255eb2c68
commit 04e3b250e7
20 changed files with 342 additions and 54 deletions

View File

@@ -2504,15 +2504,18 @@ void Session::documentApplyFields(
if (!date) {
return;
}
if (dc != 0 && access != 0) {
document->setRemoteLocation(dc, access, fileReference);
}
document->date = date;
document->setMimeString(mime);
document->updateThumbnails(thumbnailInline, thumbnail);
document->size = size;
document->recountIsImage();
document->setattributes(attributes);
// Uses 'type' that is computed from attributes.
document->recountIsImage();
if (dc != 0 && access != 0) {
document->setRemoteLocation(dc, access, fileReference);
}
if (document->sticker()
&& !document->sticker()->loc.valid()
&& thumbLocation.valid()) {