mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
fix: update renderlist after asset deleted (#16786)
This commit is contained in:
parent
d2bcf5d716
commit
6419ac74af
@ -263,10 +263,6 @@ 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 =
|
||||
|
@ -95,6 +95,11 @@ class BottomGalleryBar extends ConsumerWidget {
|
||||
|
||||
totalAssets.value -= 1;
|
||||
}
|
||||
if (isDeleted) {
|
||||
ref
|
||||
.read(currentAssetProvider.notifier)
|
||||
.set(renderList.loadAsset(assetIndex.value));
|
||||
}
|
||||
return isDeleted;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user