From ce4877e41680e1a9b5f399549885c6bae84f5f82 Mon Sep 17 00:00:00 2001 From: Ming Ming Date: Thu, 8 Sep 2022 15:22:48 +0800 Subject: [PATCH] Remove leading/trailing space from search term --- app/lib/bloc/search.dart | 2 +- app/lib/entity/search.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/bloc/search.dart b/app/lib/bloc/search.dart index b2375167..9ea687c3 100644 --- a/app/lib/bloc/search.dart +++ b/app/lib/bloc/search.dart @@ -62,7 +62,7 @@ abstract class SearchBlocState { } class SearchBlocInit extends SearchBlocState { - SearchBlocInit() : super(null, const SearchCriteria("", []), const []); + SearchBlocInit() : super(null, SearchCriteria("", []), const []); } class SearchBlocLoading extends SearchBlocState { diff --git a/app/lib/entity/search.dart b/app/lib/entity/search.dart index 8ed66967..b86acc10 100644 --- a/app/lib/entity/search.dart +++ b/app/lib/entity/search.dart @@ -5,7 +5,7 @@ import 'package:nc_photos/entity/sqlite_table_extension.dart' as sql; import 'package:nc_photos/iterable_extension.dart'; class SearchCriteria { - const SearchCriteria(this.input, this.filters); + SearchCriteria(String input, this.filters) : input = input.trim(); SearchCriteria copyWith({ String? input,