Skip to content

High performance self-hosted photo and video management solution.

fix(mobile): deletion of single assets (#15597)

Saschl3c1fa22109f4
diff --git a/mobile/lib/pages/common/gallery_viewer.page.dart b/mobile/lib/pages/common/gallery_viewer.page.dart
index 7e47c1d087..f51be027f5 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 =