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

Use both thumbnails in photos and documents.

Fixes #5602.
This commit is contained in:
John Preston
2019-01-25 18:37:28 +04:00
parent a70e72f75d
commit a1baa23a52
56 changed files with 1358 additions and 878 deletions

View File

@@ -95,7 +95,7 @@ QImage PrepareScaledFromFull(
size);
}
QPixmap PrepareScaledFromThumb(ImagePtr thumb) {
QPixmap PrepareScaledFromThumb(not_null<Image*> thumb) {
return thumb->loaded()
? App::pixmapFromImageInPlace(PrepareScaledFromFull(
thumb->original(),
@@ -315,7 +315,7 @@ void BackgroundPreviewBox::prepare() {
_scaled = PrepareScaledFromThumb(_paper.thumb);
checkLoadedDocument();
if (_paper.thumb && !_paper.thumb->loaded()) {
if (!_paper.thumb->loaded()) {
_paper.thumb->loadEvenCancelled(Data::FileOriginWallpaper(
_paper.id,
_paper.accessHash));