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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user