mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 09:14:58 +03:00
fix(mobile): blurry memory photos (#6734)
* fix(mobile): blurry memory photos * better naming and performance
This commit is contained in:
@@ -161,7 +161,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
||||
|
||||
Iterable<ImageProvider> allImageProviders(Asset asset) sync* {
|
||||
if (ImmichImage.useLocal(asset)) {
|
||||
yield ImmichImage.localThumbnailProvider(asset);
|
||||
yield ImmichImage.localImageProvider(asset);
|
||||
yield localOriginalProvider(asset);
|
||||
} else {
|
||||
yield ImmichImage.remoteThumbnailProvider(asset, webp, header);
|
||||
@@ -787,7 +787,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
||||
final a = loadAsset(index);
|
||||
if (ImmichImage.useLocal(a)) {
|
||||
return Image(
|
||||
image: ImmichImage.localThumbnailProvider(a),
|
||||
image: ImmichImage.localImageProvider(a),
|
||||
fit: BoxFit.contain,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ class MemoryCard extends HookConsumerWidget {
|
||||
height: double.infinity,
|
||||
width: double.infinity,
|
||||
type: ThumbnailFormat.JPEG,
|
||||
preferredLocalAssetSize: 2048,
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
|
||||
@@ -101,6 +101,7 @@ class MemoryPage extends HookConsumerWidget {
|
||||
asset,
|
||||
context,
|
||||
type: api.ThumbnailFormat.WEBP,
|
||||
size: 2048,
|
||||
),
|
||||
);
|
||||
precaches.add(
|
||||
@@ -108,6 +109,7 @@ class MemoryPage extends HookConsumerWidget {
|
||||
asset,
|
||||
context,
|
||||
type: api.ThumbnailFormat.JPEG,
|
||||
size: 2048,
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user