2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

Let [Photo|Document]Media outlive message view.

This commit is contained in:
John Preston
2020-05-26 18:32:38 +04:00
parent 700d3db4cc
commit dbb46ce9b0
15 changed files with 48 additions and 27 deletions

View File

@@ -79,7 +79,7 @@ Image *ReplyPreview::image(Data::FileOrigin origin) {
prepare(image, option | Images::Option::Blurred);
}
}
if (thumbnail || !_document->hasThumbnail()) {
if (_good || !_document->hasThumbnail()) {
_checked = true;
_documentMedia = nullptr;
}
@@ -101,6 +101,10 @@ Image *ReplyPreview::image(Data::FileOrigin origin) {
prepare(blurred, Images::Option::Blurred);
}
}
if (_good) {
_checked = true;
_photoMedia = nullptr;
}
}
}
return _image.get();