TF-2302 Resolve conflicts on the master branch

Signed-off-by: dab246 <tdvu@linagora.com>
(cherry picked from commit 6eb9f32ee0f67d9b78be13a4ecd4b1ae2b4de9a0)
This commit is contained in:
dab246
2023-11-09 16:49:20 +07:00
committed by Dat Vu
parent 3d5677f6e0
commit dbdffff355
9 changed files with 87 additions and 101 deletions
@@ -1036,40 +1036,35 @@ class ComposerController extends BaseController {
_getAutoCompleteInteractor = getBinding<GetAutoCompleteInteractor>();
_getDeviceContactSuggestionsInteractor = getBinding<GetDeviceContactSuggestionsInteractor>();
final accountId = mailboxDashBoardController.accountId.value;
if (_contactSuggestionSource == ContactSuggestionSource.all) {
if (_getAllAutoCompleteInteractor == null && _getDeviceContactSuggestionsInteractor == null) {
return <EmailAddress>[];
} else if (_getDeviceContactSuggestionsInteractor != null) {
final listEmailAddress = await _getDeviceContactSuggestionsInteractor!
.execute(AutoCompletePattern(word: word, accountId: accountId))
if (_getAllAutoCompleteInteractor != null) {
return await _getAllAutoCompleteInteractor!
.execute(AutoCompletePattern(word: word, accountId: mailboxDashBoardController.accountId.value))
.then((value) => value.fold(
(failure) => <EmailAddress>[],
(success) => _getAutoCompleteSuccess(success, word)
));
return listEmailAddress;
} else if (_getDeviceContactSuggestionsInteractor != null) {
return await _getDeviceContactSuggestionsInteractor!
.execute(AutoCompletePattern(word: word, accountId: mailboxDashBoardController.accountId.value))
.then((value) => value.fold(
(failure) => <EmailAddress>[],
(success) => _getAutoCompleteSuccess(success, word)
));
} else {
return <EmailAddress>[];
}
final listEmailAddress = await _getAllAutoCompleteInteractor!
.execute(AutoCompletePattern(word: word, accountId: accountId))
.then((value) => value.fold(
(failure) => <EmailAddress>[],
(success) => _getAutoCompleteSuccess(success, word)
));
return listEmailAddress;
} else {
if (_getAutoCompleteInteractor == null) {
return <EmailAddress>[];
}
final listEmailAddress = await _getAutoCompleteInteractor!
.execute(AutoCompletePattern(word: word, accountId: accountId))
} else {
return await _getAutoCompleteInteractor!
.execute(AutoCompletePattern(word: word, accountId: mailboxDashBoardController.accountId.value))
.then((value) => value.fold(
(failure) => <EmailAddress>[],
(success) => _getAutoCompleteSuccess(success, word)
));
return listEmailAddress;
}
}
}