mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 11:56:46 +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,
|
AssetType? mediaType,
|
||||||
}) {
|
}) {
|
||||||
return SearchFilter(
|
return SearchFilter(
|
||||||
context: context,
|
context: context ?? this.context,
|
||||||
filename: filename,
|
filename: filename ?? this.filename,
|
||||||
people: people ?? this.people,
|
people: people ?? this.people,
|
||||||
location: location ?? this.location,
|
location: location ?? this.location,
|
||||||
camera: camera ?? this.camera,
|
camera: camera ?? this.camera,
|
||||||
|
|
|
@ -441,19 +441,15 @@ class SearchPage extends HookConsumerWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleTextSubmitted(String value) {
|
handleTextSubmitted(String value) {
|
||||||
if (value.isEmpty) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isContextualSearch.value) {
|
if (isContextualSearch.value) {
|
||||||
filter.value = filter.value.copyWith(
|
filter.value = filter.value.copyWith(
|
||||||
filename: null,
|
filename: '',
|
||||||
context: value,
|
context: value,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
filter.value = filter.value.copyWith(
|
filter.value = filter.value.copyWith(
|
||||||
filename: value,
|
filename: value,
|
||||||
context: null,
|
context: '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue