fix(mobile): search page issues (#15804)

* fix: don't repeat search

* fix: show snackbar for no result

* fix: do not search on empty filter

* chore: syling
This commit is contained in:
Alex
2025-01-30 21:12:57 -06:00
committed by GitHub
parent 4fccc09fc1
commit 098bab7c9b
7 changed files with 159 additions and 14 deletions
@@ -255,6 +255,23 @@ class SearchFilter {
required this.mediaType,
});
bool get isEmpty {
return (context == null || (context != null && context!.isEmpty)) &&
(filename == null || (filename!.isEmpty)) &&
people.isEmpty &&
location.country == null &&
location.state == null &&
location.city == null &&
camera.make == null &&
camera.model == null &&
date.takenBefore == null &&
date.takenAfter == null &&
display.isNotInAlbum == false &&
display.isArchive == false &&
display.isFavorite == false &&
mediaType == AssetType.other;
}
SearchFilter copyWith({
String? context,
String? filename,