From dc8c7054203aa95da5bd2d256594fc034238c0db Mon Sep 17 00:00:00 2001 From: bwees Date: Tue, 16 Sep 2025 19:48:04 -0500 Subject: [PATCH] fix: bottom sheet now is usable when navigating to another asset viewer --- .../widgets/asset_viewer/bottom_sheet.widget.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet.widget.dart b/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet.widget.dart index b623226b3d..2d948790da 100644 --- a/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet.widget.dart +++ b/mobile/lib/presentation/widgets/asset_viewer/bottom_sheet.widget.dart @@ -11,6 +11,7 @@ import 'package:immich_mobile/domain/models/setting.model.dart'; import 'package:immich_mobile/extensions/build_context_extensions.dart'; import 'package:immich_mobile/extensions/translate_extensions.dart'; import 'package:immich_mobile/presentation/widgets/album/album_tile.dart'; +import 'package:immich_mobile/presentation/widgets/asset_viewer/asset_viewer.state.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/bottom_sheet/sheet_location_details.widget.dart'; import 'package:immich_mobile/presentation/widgets/asset_viewer/bottom_sheet/sheet_people_details.widget.dart'; import 'package:immich_mobile/presentation/widgets/bottom_sheet/base_bottom_sheet.widget.dart'; @@ -176,7 +177,8 @@ class _AssetDetailBottomSheet extends ConsumerWidget { onAlbumSelected: (album) async { final prevAlbum = ref.read(currentRemoteAlbumProvider); ref.read(currentRemoteAlbumProvider.notifier).setAlbum(album); - await context.router.push(RemoteAlbumRoute(album: album)); + ref.invalidate(assetViewerProvider); + context.router.popAndPush(RemoteAlbumRoute(album: album)); if (prevAlbum != null) { ref.read(currentRemoteAlbumProvider.notifier).setAlbum(prevAlbum); }