diff --git a/mobile/lib/pages/common/gallery_viewer.page.dart b/mobile/lib/pages/common/gallery_viewer.page.dart index 7e47c1d087efc..f51be027f562b 100644 --- a/mobile/lib/pages/common/gallery_viewer.page.dart +++ b/mobile/lib/pages/common/gallery_viewer.page.dart @@ -262,6 +262,11 @@ class GalleryViewerPage extends HookConsumerWidget { PhotoViewGalleryPageOptions buildAsset(BuildContext context, int index) { var newAsset = loadAsset(index); + + WidgetsBinding.instance.addPostFrameCallback((_) { + ref.read(currentAssetProvider.notifier).set(newAsset); + }); + final stackId = newAsset.stackId; if (stackId != null && currentIndex.value == index) { final stackElements =