1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-16 07:24:40 +02:00

fix: ensure buffer loaded before opening asset viewer (#19864)

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2025-07-11 01:51:50 +05:30
committed by GitHub
parent d178c52ba6
commit 70b73145f1

View File

@ -159,17 +159,18 @@ class _AssetTileWidget extends ConsumerWidget {
required this.assetIndex,
});
void _handleOnTap(
Future _handleOnTap(
BuildContext ctx,
WidgetRef ref,
int assetIndex,
BaseAsset asset,
) {
) async {
final multiSelectState = ref.read(multiSelectProvider);
if (multiSelectState.forceEnable || multiSelectState.isEnabled) {
ref.read(multiSelectProvider.notifier).toggleAssetSelection(asset);
} else {
await ref.read(timelineServiceProvider).loadAssets(assetIndex, 1);
ctx.pushRoute(
AssetViewerRoute(
initialIndex: assetIndex,