mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(mobile): lazy loading of assets (#2413)
This commit is contained in:
committed by
GitHub
parent
93863b0629
commit
0dde76bbbc
@@ -8,6 +8,8 @@ class SearchResultGrid extends HookConsumerWidget {
|
||||
|
||||
final List<Asset> assets;
|
||||
|
||||
Asset _loadAsset(int index) => assets[index];
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
return GridView.builder(
|
||||
@@ -22,7 +24,9 @@ class SearchResultGrid extends HookConsumerWidget {
|
||||
final asset = assets[index];
|
||||
return ThumbnailImage(
|
||||
asset: asset,
|
||||
assetList: assets,
|
||||
index: index,
|
||||
loadAsset: _loadAsset,
|
||||
totalAssets: assets.length,
|
||||
useGrayBoxPlaceholder: true,
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user