mirror of
https://github.com/immich-app/immich.git
synced 2025-06-04 22:24:26 -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) {
|
PhotoViewGalleryPageOptions buildAsset(BuildContext context, int index) {
|
||||||
var newAsset = loadAsset(index);
|
var newAsset = loadAsset(index);
|
||||||
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
|
||||||
ref.read(currentAssetProvider.notifier).set(newAsset);
|
|
||||||
});
|
|
||||||
|
|
||||||
final stackId = newAsset.stackId;
|
final stackId = newAsset.stackId;
|
||||||
if (stackId != null && currentIndex.value == index) {
|
if (stackId != null && currentIndex.value == index) {
|
||||||
final stackElements =
|
final stackElements =
|
||||||
|
@ -95,6 +95,11 @@ class BottomGalleryBar extends ConsumerWidget {
|
|||||||
|
|
||||||
totalAssets.value -= 1;
|
totalAssets.value -= 1;
|
||||||
}
|
}
|
||||||
|
if (isDeleted) {
|
||||||
|
ref
|
||||||
|
.read(currentAssetProvider.notifier)
|
||||||
|
.set(renderList.loadAsset(assetIndex.value));
|
||||||
|
}
|
||||||
return isDeleted;
|
return isDeleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user