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
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(