From d15590460970a562b995d78f1a178d8b10accaa2 Mon Sep 17 00:00:00 2001 From: Marty Fuhry Date: Wed, 22 Feb 2023 20:52:47 -0500 Subject: [PATCH] fixes the precache to also cache the jpeg image --- .../asset_viewer/views/gallery_viewer.dart | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart b/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart index e850d260e..d8977a362 100644 --- a/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart +++ b/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart @@ -137,7 +137,7 @@ class GalleryViewerPage extends HookConsumerWidget { // Preload the local asset precacheImage(localImageProvider(asset), context); } else { - // Probably load WEBP either way + // Cache the thumbnail WEBP either way precacheImage( remoteThumbnailImageProvider( asset, @@ -145,16 +145,16 @@ class GalleryViewerPage extends HookConsumerWidget { ), context, ); - if (isLoadPreview.value) { - // Precache the JPEG thumbnail - precacheImage( - remoteThumbnailImageProvider( - asset, - api.ThumbnailFormat.JPEG, - ), - context, - ); - } + + // Precache the JPEG thumbnail + precacheImage( + remoteThumbnailImageProvider( + asset, + api.ThumbnailFormat.JPEG, + ), + context, + ); + if (isLoadOriginal.value) { // Preload the original asset precacheImage(