1
0
Fork 0
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:
johnstef99 2024-12-23 00:53:48 +02:00
parent 4bc2aa5451
commit eb8f4898b3
2 changed files with 4 additions and 8 deletions

View file

@ -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,

View file

@ -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: '',
); );
} }