Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Add mounted check before setState in _refreshTrashFiles

AmanRajSinghMourya714e3a293f35
diff --git a/mobile/apps/locker/lib/ui/pages/trash_page.dart b/mobile/apps/locker/lib/ui/pages/trash_page.dart
index d57d70e2ae..6eb09a0a2f 100644
--- a/mobile/apps/locker/lib/ui/pages/trash_page.dart
+++ b/mobile/apps/locker/lib/ui/pages/trash_page.dart
@@ -57,6 +57,7 @@ class _TrashPageState extends State<TrashPage> {
Future<void> _refreshTrashFiles() async {
final trashFiles = await TrashService.instance.getTrashFiles();
+ if (!mounted) return;
setState(() {
_trashFiles = List.from(trashFiles);
});