2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Move photo data to Data::PhotoMedia.

This commit is contained in:
John Preston
2020-05-25 18:16:04 +04:00
parent 24fed8105c
commit e27d2bc2d5
51 changed files with 1628 additions and 922 deletions

View File

@@ -700,10 +700,10 @@ void DocumentData::loadThumbnail(Data::FileOrigin origin) {
_flags |= Flag::ThumbnailFailed;
}, [=] {
if (_thumbnailLoader && !_thumbnailLoader->cancelled()) {
if (auto image = _thumbnailLoader->imageData(); image.isNull()) {
if (auto read = _thumbnailLoader->imageData(); read.isNull()) {
_flags |= Flag::ThumbnailFailed;
} else if (const auto active = activeMediaView()) {
active->setThumbnail(std::move(image));
active->setThumbnail(std::move(read));
}
}
_thumbnailLoader = nullptr;