mirror of
https://github.com/immich-app/immich.git
synced 2025-02-04 01:09:14 -05:00
fixed local asset thumbnail size and eliminated fade in duration of loading assets (#1525)
This commit is contained in:
parent
a1806390b0
commit
0b65cea6fd
1 changed files with 6 additions and 1 deletions
|
@ -108,7 +108,10 @@ class GalleryViewerPage extends HookConsumerWidget {
|
||||||
return AssetEntityImageProvider(
|
return AssetEntityImageProvider(
|
||||||
asset.local!,
|
asset.local!,
|
||||||
isOriginal: false,
|
isOriginal: false,
|
||||||
thumbnailSize: const ThumbnailSize.square(250),
|
thumbnailSize: ThumbnailSize(
|
||||||
|
MediaQuery.of(context).size.width.floor(),
|
||||||
|
MediaQuery.of(context).size.height.floor(),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -285,6 +288,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
||||||
cacheKey: getThumbnailCacheKey(asset.remote!, type: api.ThumbnailFormat.WEBP),
|
cacheKey: getThumbnailCacheKey(asset.remote!, type: api.ThumbnailFormat.WEBP),
|
||||||
httpHeaders: { 'Authorization': authToken },
|
httpHeaders: { 'Authorization': authToken },
|
||||||
progressIndicatorBuilder: (_, __, ___) => const Center(child: ImmichLoadingIndicator(),),
|
progressIndicatorBuilder: (_, __, ___) => const Center(child: ImmichLoadingIndicator(),),
|
||||||
|
fadeInDuration: const Duration(milliseconds: 0),
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -293,6 +297,7 @@ class GalleryViewerPage extends HookConsumerWidget {
|
||||||
cacheKey: getThumbnailCacheKey(asset.remote!, type: api.ThumbnailFormat.JPEG),
|
cacheKey: getThumbnailCacheKey(asset.remote!, type: api.ThumbnailFormat.JPEG),
|
||||||
httpHeaders: { 'Authorization': authToken },
|
httpHeaders: { 'Authorization': authToken },
|
||||||
fit: BoxFit.contain,
|
fit: BoxFit.contain,
|
||||||
|
fadeInDuration: const Duration(milliseconds: 0),
|
||||||
placeholder: (_, __) => webPThumbnail,
|
placeholder: (_, __) => webPThumbnail,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue