Skip to content

armgit / ente

Public Imported from GitHub
0

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

use better variable names

ashilkn22e3b0be0ed9
diff --git a/lib/ui/search_tab.dart b/lib/ui/search_tab.dart
index 1e032b5203..b2d57e3ead 100644
--- a/lib/ui/search_tab.dart
+++ b/lib/ui/search_tab.dart
@@ -8,7 +8,7 @@ import "package:photos/ui/viewer/search/search_section.dart";
import "package:photos/ui/viewer/search/search_suggestions.dart";
import "package:photos/ui/viewer/search/search_widget_new.dart";
-late Future<List<List<SearchResult>>> allSectionsExamples;
+late Future<List<List<SearchResult>>> allSectionsExamplesFuture;
class SearchTab extends StatefulWidget {
const SearchTab({Key? key}) : super(key: key);
@@ -61,13 +61,13 @@ class AllSearchSections extends StatefulWidget {
}
class _AllSearchSectionsState extends State<AllSearchSections> {
- late List<Future<List<SearchResult>>> sectionExamples;
+ late List<Future<List<SearchResult>>> allSectionsExamples;
static const _limit = 7;
@override
void initState() {
super.initState();
- sectionExamples = <Future<List<SearchResult>>>[];
+ allSectionsExamples = <Future<List<SearchResult>>>[];
}
@override
@@ -78,9 +78,11 @@ class _AllSearchSectionsState extends State<AllSearchSections> {
sectionType == SectionType.content) {
continue;
}
- sectionExamples.add(sectionType.getData(limit: _limit, context: context));
+ allSectionsExamples
+ .add(sectionType.getData(limit: _limit, context: context));
}
- allSectionsExamples = Future.wait<List<SearchResult>>(sectionExamples);
+ allSectionsExamplesFuture =
+ Future.wait<List<SearchResult>>(allSectionsExamples);
}
@override
@@ -95,7 +97,7 @@ class _AllSearchSectionsState extends State<AllSearchSections> {
child: Stack(
children: [
FutureBuilder(
- future: allSectionsExamples,
+ future: allSectionsExamplesFuture,
builder: (context, snapshot) {
if (snapshot.hasData) {
return ListView.builder(
diff --git a/lib/ui/viewer/search/result/no_result_widget.dart b/lib/ui/viewer/search/result/no_result_widget.dart
index dccede3a44..5d1d43212f 100644
--- a/lib/ui/viewer/search/result/no_result_widget.dart
+++ b/lib/ui/viewer/search/result/no_result_widget.dart
@@ -20,7 +20,7 @@ class _NoResultWidgetState extends State<NoResultWidget> {
// remove face and content sectionType
searchTypes.remove(SectionType.face);
searchTypes.remove(SectionType.content);
- allSectionsExamples.then((value) {
+ allSectionsExamplesFuture.then((value) {
for (int i = 0; i < searchTypes.length; i++) {
final querySuggestions = <String>[];
for (int j = 0; j < 2 && j < value[i].length; j++) {