TF-1155 Automatically clear value of From/To field when disable advanced search

Signed-off-by: dab246 <tdvu@linagora.com>
(cherry picked from commit 6f6e6970887525f3fbb9d0003eda8e1c5d41afa0)
This commit is contained in:
dab246
2023-11-08 14:50:26 +07:00
committed by Dat Vu
parent a0fede7b8f
commit 0c4fe85b69
6 changed files with 37 additions and 43 deletions
@@ -47,7 +47,7 @@ class SearchEmailFilter with EquatableMixin {
SearchEmailFilter copyWith({
Option<Set<String>>? fromOption,
Set<String>? to,
Option<Set<String>>? toOption,
SearchQuery? text,
Option<String>? subjectOption,
Set<String>? notKeyword,
@@ -60,7 +60,7 @@ class SearchEmailFilter with EquatableMixin {
}) {
return SearchEmailFilter(
from: _getOptionParam(fromOption, from),
to: to ?? this.to,
to: _getOptionParam(toOption, to),
text: text ?? this.text,
subject: _getOptionParam(subjectOption, subject),
notKeyword: notKeyword ?? this.notKeyword,