fix: update renderlist after asset deleted (#16786)

This commit is contained in:
Saschl 2025-03-28 19:34:19 +01:00 committed by GitHub
parent d2bcf5d716
commit 6419ac74af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 4 deletions

View file

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