fixes the precache to also cache the jpeg image

This commit is contained in:
Marty Fuhry 2023-02-22 20:52:47 -05:00
parent a3b9a0be3a
commit d155904609

View file

@ -137,7 +137,7 @@ class GalleryViewerPage extends HookConsumerWidget {
// Preload the local asset // Preload the local asset
precacheImage(localImageProvider(asset), context); precacheImage(localImageProvider(asset), context);
} else { } else {
// Probably load WEBP either way // Cache the thumbnail WEBP either way
precacheImage( precacheImage(
remoteThumbnailImageProvider( remoteThumbnailImageProvider(
asset, asset,
@ -145,16 +145,16 @@ class GalleryViewerPage extends HookConsumerWidget {
), ),
context, context,
); );
if (isLoadPreview.value) {
// Precache the JPEG thumbnail // Precache the JPEG thumbnail
precacheImage( precacheImage(
remoteThumbnailImageProvider( remoteThumbnailImageProvider(
asset, asset,
api.ThumbnailFormat.JPEG, api.ThumbnailFormat.JPEG,
), ),
context, context,
); );
}
if (isLoadOriginal.value) { if (isLoadOriginal.value) {
// Preload the original asset // Preload the original asset
precacheImage( precacheImage(