Skip to content

armgit / ente

Public Imported from GitHub
0

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

remove search type with no suggestion queries from map

ashilkne1fc0d4ad1d6
diff --git a/lib/ui/viewer/search/result/no_result_widget.dart b/lib/ui/viewer/search/result/no_result_widget.dart
index 6aef909124..c76af71f0c 100644
--- a/lib/ui/viewer/search/result/no_result_widget.dart
+++ b/lib/ui/viewer/search/result/no_result_widget.dart
@@ -26,9 +26,10 @@ class _NoResultWidgetState extends State<NoResultWidget> {
for (int j = 0; j < 2 && j < value[i].length; j++) {
querySuggestions.add(value[i][j].name());
}
- //todo: remove keys with empty list
- searchTypeToQuerySuggestion
- .addAll({searchTypes[i].sectionTitle(context): querySuggestions});
+ if (querySuggestions.isNotEmpty) {
+ searchTypeToQuerySuggestion
+ .addAll({searchTypes[i].sectionTitle(context): querySuggestions});
+ }
}
setState(() {});
});