mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
fix: update renderlist after asset deleted (#16786)
This commit is contained in:
parent
d2bcf5d716
commit
6419ac74af
2 changed files with 5 additions and 4 deletions
|
|
@ -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…
Reference in a new issue