π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
show empty state if query is not null and no search results
ashilkn8f80f47d9136
diff --git a/lib/ui/search_tab.dart b/lib/ui/search_tab.dartindex 4977bf7f1a..cfebbd1d72 100644--- a/lib/ui/search_tab.dart+++ b/lib/ui/search_tab.dart@@ -3,8 +3,10 @@ import "package:photos/models/search/search_result.dart";import "package:photos/models/search/search_types.dart";import "package:photos/states/search_results_state.dart";import "package:photos/ui/common/loading_widget.dart";+import "package:photos/ui/viewer/search/result/no_result_widget.dart";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";class SearchTab extends StatefulWidget {const SearchTab({Key? key}) : super(key: key);@@ -31,7 +33,9 @@ class _SearchTabState extends State<SearchTab> {return Padding(padding: const EdgeInsets.only(top: 8),child: _searchResults.isEmpty- ? const AllSearchSections()+ ? isSearchQueryEmpty+ ? const AllSearchSections()+ : const NoResultWidget(): SearchSuggestionsWidget(_searchResults),);}diff --git a/lib/ui/viewer/search/search_widget_new.dart b/lib/ui/viewer/search/search_widget_new.dartindex 6d5d68a656..f3ddd67ca7 100644--- a/lib/ui/viewer/search/search_widget_new.dart+++ b/lib/ui/viewer/search/search_widget_new.dart@@ -13,6 +13,8 @@ import "package:photos/ui/viewer/search/search_suffix_icon_widget.dart";import "package:photos/utils/date_time_util.dart";import "package:photos/utils/debouncer.dart";+bool isSearchQueryEmpty = true;+class SearchWidgetNew extends StatefulWidget {const SearchWidgetNew({Key? key}) : super(key: key);@@ -79,10 +81,10 @@ class _SearchWidgetNewState extends State<SearchWidgetNew> {padding: const EdgeInsets.symmetric(vertical: 12),child: Padding(padding: const EdgeInsets.symmetric(vertical: 2, horizontal: 8),- child: Container(- color: colorScheme.backgroundBase,- child: ClipRRect(- borderRadius: BorderRadius.circular(8),+ child: ClipRRect(+ borderRadius: BorderRadius.circular(8),+ child: Container(+ color: colorScheme.backgroundBase,child: Container(height: 44,color: colorScheme.fillFaint,@@ -140,6 +142,9 @@ class _SearchWidgetNewState extends State<SearchWidgetNew> {),),onChanged: (value) async {+ isSearchQueryEmpty = value.isEmpty;++ //Why is this required?_query = value;final List<SearchResult> allResults =await getSearchResultsForQuery(context, value);