Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] add debouncer to reloading user collections tab on FavoritesServiceInitCompleteEvent

ashilkn0a4abada00e1
diff --git a/mobile/lib/ui/tabs/user_collections_tab.dart b/mobile/lib/ui/tabs/user_collections_tab.dart
index b3d1a64327..20a012d0c2 100644
--- a/mobile/lib/ui/tabs/user_collections_tab.dart
+++ b/mobile/lib/ui/tabs/user_collections_tab.dart
@@ -83,8 +83,10 @@ class _UserCollectionsTabState extends State<UserCollectionsTab>
});
_favoritesServiceInitCompleteEvent =
Bus.instance.on<FavoritesServiceInitCompleteEvent>().listen((event) {
- _loadReason = event.reason;
- setState(() {});
+ _debouncer.run(() async {
+ _loadReason = event.reason;
+ setState(() {});
+ });
});
sortKey = LocalSettings.instance.albumSortKey();
}