1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-17 15:47:54 +02:00

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

fix: set asset in currentassetprovider on image load

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Saschl
2025-01-24 18:47:54 +01:00
committed by GitHub
parent c0210bd6c0
commit 3c1fa22109

View File

@ -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 =