feat: search by description (#15818)

* feat: search by description

* wip: mobile

* wip: mobile ui

* wip: mobile search logic

* feat: using f_unaccent

* icon to fit with text search
This commit is contained in:
Alex 2025-02-02 15:18:13 -06:00 committed by GitHub
parent a808a840c8
commit 4efacfbb91
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 217 additions and 31 deletions

View file

@ -235,6 +235,7 @@ class SearchDisplayFilters {
class SearchFilter {
String? context;
String? filename;
String? description;
Set<Person> people;
SearchLocationFilter location;
SearchCameraFilter camera;
@ -247,6 +248,7 @@ class SearchFilter {
SearchFilter({
this.context,
this.filename,
this.description,
required this.people,
required this.location,
required this.camera,
@ -258,6 +260,7 @@ class SearchFilter {
bool get isEmpty {
return (context == null || (context != null && context!.isEmpty)) &&
(filename == null || (filename!.isEmpty)) &&
(description == null || (description!.isEmpty)) &&
people.isEmpty &&
location.country == null &&
location.state == null &&
@ -275,6 +278,7 @@ class SearchFilter {
SearchFilter copyWith({
String? context,
String? filename,
String? description,
Set<Person>? people,
SearchLocationFilter? location,
SearchCameraFilter? camera,
@ -285,6 +289,7 @@ class SearchFilter {
return SearchFilter(
context: context ?? this.context,
filename: filename ?? this.filename,
description: description ?? this.description,
people: people ?? this.people,
location: location ?? this.location,
camera: camera ?? this.camera,
@ -296,7 +301,7 @@ class SearchFilter {
@override
String toString() {
return 'SearchFilter(context: $context, filename: $filename, people: $people, location: $location, camera: $camera, date: $date, display: $display, mediaType: $mediaType)';
return 'SearchFilter(context: $context, filename: $filename, description: $description, people: $people, location: $location, camera: $camera, date: $date, display: $display, mediaType: $mediaType)';
}
@override
@ -305,6 +310,7 @@ class SearchFilter {
return other.context == context &&
other.filename == filename &&
other.description == description &&
other.people == people &&
other.location == location &&
other.camera == camera &&
@ -317,6 +323,7 @@ class SearchFilter {
int get hashCode {
return context.hashCode ^
filename.hashCode ^
description.hashCode ^
people.hashCode ^
location.hashCode ^
camera.hashCode ^