Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob] Fix: Add missing check for widget mount (#5764)

Neeraj3a34fa425708
diff --git a/mobile/lib/ui/home/loading_photos_widget.dart b/mobile/lib/ui/home/loading_photos_widget.dart
index f6846438e8..d4eeb92650 100644
--- a/mobile/lib/ui/home/loading_photos_widget.dart
+++ b/mobile/lib/ui/home/loading_photos_widget.dart
@@ -39,7 +39,9 @@ class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
void initState() {
super.initState();
Future.delayed(const Duration(seconds: 60), () {
- oneMinuteOnScreen.value = true;
+ if (mounted) {
+ oneMinuteOnScreen.value = true;
+ }
});
_firstImportEvent =
Bus.instance.on<SyncStatusUpdate>().listen((event) async {