Skip to content

armgit / ente

Public Imported from GitHub
0

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

Update displayed files notifier to use post-frame callback for better performance

AmanRajSinghMouryad45bc0f90b58
diff --git a/mobile/apps/locker/lib/ui/components/recents_section_widget.dart b/mobile/apps/locker/lib/ui/components/recents_section_widget.dart
index fdd4428066..45a795b6ef 100644
--- a/mobile/apps/locker/lib/ui/components/recents_section_widget.dart
+++ b/mobile/apps/locker/lib/ui/components/recents_section_widget.dart
@@ -216,7 +216,9 @@ class _RecentsSectionWidgetState extends State<RecentsSectionWidget> {
});
// Update notifier when filters are cleared
- _updateDisplayedFilesNotifier();
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ _updateDisplayedFilesNotifier();
+ });
return;
}
@@ -271,7 +273,9 @@ class _RecentsSectionWidgetState extends State<RecentsSectionWidget> {
});
// Update notifier with the new displayed files
- _updateDisplayedFilesNotifier();
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ _updateDisplayedFilesNotifier();
+ });
}
Future<Map<int, List<Collection>>> _ensureCollectionsForFiles(