fix: Bunc of uncaught exceptions

This commit is contained in:
PartyDonut 2025-08-30 09:32:20 +02:00
parent 9c964e7b41
commit 9f6aa1e489
6 changed files with 34 additions and 23 deletions

View file

@ -88,10 +88,12 @@ class _PhotoViewerScreenState extends ConsumerState<PhotoViewerScreen> with Widg
final newItems = await Future.value(widget.loadingItems);
setState(() {
photos = {...photos, ...newItems}.toList();
loadingItems = false;
});
if (context.mounted) {
setState(() {
photos = {...photos, ...newItems}.toList();
loadingItems = false;
});
}
}
},
);