diff --git a/mobile/lib/models/search/search_filter.model.dart b/mobile/lib/models/search/search_filter.model.dart index 47baf356b7..297a819b6a 100644 --- a/mobile/lib/models/search/search_filter.model.dart +++ b/mobile/lib/models/search/search_filter.model.dart @@ -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, diff --git a/mobile/lib/pages/search/search.page.dart b/mobile/lib/pages/search/search.page.dart index 01119485cf..bfde8aac96 100644 --- a/mobile/lib/pages/search/search.page.dart +++ b/mobile/lib/pages/search/search.page.dart @@ -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: '', ); }