mirror of
https://github.com/immich-app/immich.git
synced 2025-01-04 02:46:47 +01:00
fix(mobile): fix text search
This commit is contained in:
parent
4bc2aa5451
commit
eb8f4898b3
2 changed files with 4 additions and 8 deletions
|
@ -266,8 +266,8 @@ class SearchFilter {
|
|||
AssetType? mediaType,
|
||||
}) {
|
||||
return SearchFilter(
|
||||
context: context,
|
||||
filename: filename,
|
||||
context: context ?? this.context,
|
||||
filename: filename ?? this.filename,
|
||||
people: people ?? this.people,
|
||||
location: location ?? this.location,
|
||||
camera: camera ?? this.camera,
|
||||
|
|
|
@ -441,19 +441,15 @@ class SearchPage extends HookConsumerWidget {
|
|||
}
|
||||
|
||||
handleTextSubmitted(String value) {
|
||||
if (value.isEmpty) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isContextualSearch.value) {
|
||||
filter.value = filter.value.copyWith(
|
||||
filename: null,
|
||||
filename: '',
|
||||
context: value,
|
||||
);
|
||||
} else {
|
||||
filter.value = filter.value.copyWith(
|
||||
filename: value,
|
||||
context: null,
|
||||
context: '',
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue