Skip to content

armgit / ente

Public Imported from GitHub
0

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

Avoid computing data for contacts section for the search tab since it has been moved temporarily to the shared collections tab

ashilkna614636789e8
diff --git a/mobile/lib/states/all_sections_examples_state.dart b/mobile/lib/states/all_sections_examples_state.dart
index 19e640d318..2a9482f63f 100644
--- a/mobile/lib/states/all_sections_examples_state.dart
+++ b/mobile/lib/states/all_sections_examples_state.dart
@@ -96,9 +96,16 @@ class _AllSectionsExamplesProviderState
_logger.info("'_debounceTimer: reloading all sections in search tab");
final allSectionsExamples = <Future<List<SearchResult>>>[];
for (SectionType sectionType in SectionType.values) {
- allSectionsExamples.add(
- sectionType.getData(context, limit: kSearchSectionLimit),
- );
+ // Contacts section have been moved to shared collections tab
+ // temporarily from search tab. So we can skip computing data here
+ // since 'allSectionsExamples' is for search tab sections only.
+ if (sectionType == SectionType.contacts) {
+ allSectionsExamples.add(Future.value([]));
+ } else {
+ allSectionsExamples.add(
+ sectionType.getData(context, limit: kSearchSectionLimit),
+ );
+ }
}
try {
allSectionsExamplesFuture = Future.wait<List<SearchResult>>(