High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(mobile): no results before applying filter (#27155)
Yarosbf065a834fa4
diff --git a/mobile/lib/presentation/pages/search/drift_search.page.dart b/mobile/lib/presentation/pages/search/drift_search.page.dartindex f4b9cd9103..452f6cc1d5 100644--- a/mobile/lib/presentation/pages/search/drift_search.page.dart+++ b/mobile/lib/presentation/pages/search/drift_search.page.dart@@ -69,6 +69,7 @@ class DriftSearchPage extends HookConsumerWidget {);final previousFilter = useState<SearchFilter?>(null);+ final hasRequestedSearch = useState<bool>(false);final dateInputFilter = useState<DateFilterInputModel?>(null);final peopleCurrentFilterWidget = useState<Widget?>(null);@@ -91,9 +92,11 @@ class DriftSearchPage extends HookConsumerWidget {if (filter.isEmpty) {previousFilter.value = null;+ hasRequestedSearch.value = false;return;}+ hasRequestedSearch.value = true;unawaited(ref.read(paginatedSearchProvider.notifier).search(filter));previousFilter.value = filter;}@@ -721,7 +724,7 @@ class DriftSearchPage extends HookConsumerWidget {),),),- if (filter.value.isEmpty)+ if (!hasRequestedSearch.value)const _SearchSuggestions()else_SearchResultGrid(onScrollEnd: loadMoreSearchResults),