TF-2305 The from and to email search filters now work even without the contact/autocomplete capability
This commit is contained in:
committed by
Dat H. Pham
parent
0bb9295885
commit
256d69f042
@@ -153,6 +153,9 @@ class ContactController extends BaseController with AutoCompleteResultMixin {
|
|||||||
Future<void> _searchContactByNameOrEmail(String query) async {
|
Future<void> _searchContactByNameOrEmail(String query) async {
|
||||||
log('ContactController::_searchContactByNameOrEmail(): query: $query');
|
log('ContactController::_searchContactByNameOrEmail(): query: $query');
|
||||||
final listContact = await _getAutoCompleteSuggestion(query);
|
final listContact = await _getAutoCompleteSuggestion(query);
|
||||||
|
if (query.isEmail && !listContact.any((emailAddress) => emailAddress.email == query)) {
|
||||||
|
listContact.add(EmailAddress(null, query));
|
||||||
|
}
|
||||||
searchedContactList.value = listContact;
|
searchedContactList.value = listContact;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user