1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-04-21 07:26:25 +02:00

fix(mobile): deletion of single assets ()

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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 =