π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
refactor + use better fn name
ashilknee560a4c00a4
diff --git a/lib/states/all_sections_examples_state.dart b/lib/states/all_sections_examples_state.dartindex 051e30f95b..8fe5a3ffe1 100644--- a/lib/states/all_sections_examples_state.dart+++ b/lib/states/all_sections_examples_state.dart@@ -34,35 +34,30 @@ class _AllSectionsExamplesProviderStateSchedulerBinding.instance.addPostFrameCallback((timeStamp) {//add all common events for all search sections to reload to here._filesUpdatedEvent = Bus.instance.on<FilesUpdatedEvent>().listen((event) {- _debouncer.run(() async {- setState(() {- aggregateSectionsExamples();- });- });- });-- _debouncer.run(() async {- setState(() {- aggregateSectionsExamples();- });+ reloadAllSections();});+ reloadAllSections();});}- void aggregateSectionsExamples() {- _logger.info("reloading all sections in search tab");- final allSectionsExamples = <Future<List<SearchResult>>>[];- for (SectionType sectionType in SectionType.values) {- if (sectionType == SectionType.face ||- sectionType == SectionType.content) {- continue;- }- allSectionsExamples.add(- sectionType.getData(limit: searchSectionLimit, context: context),- );- }- allSectionsExamplesFuture =- Future.wait<List<SearchResult>>(allSectionsExamples);+ void reloadAllSections() {+ _debouncer.run(() async {+ setState(() {+ _logger.info("reloading all sections in search tab");+ final allSectionsExamples = <Future<List<SearchResult>>>[];+ for (SectionType sectionType in SectionType.values) {+ if (sectionType == SectionType.face ||+ sectionType == SectionType.content) {+ continue;+ }+ allSectionsExamples.add(+ sectionType.getData(limit: searchSectionLimit, context: context),+ );+ }+ allSectionsExamplesFuture =+ Future.wait<List<SearchResult>>(allSectionsExamples);+ });+ });}@override