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:
@@ -34,7 +34,7 @@ class GetAllAutoCompleteInteractor {
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]
|
||||
);
|
||||
log('GetAllAutoCompleteInteractor::execute:listEmailAddressFromServerc: $listEmailAddressFromServer');
|
||||
log('GetAllAutoCompleteInteractor::execute:listEmailAddressFromServer: $listEmailAddressFromServer');
|
||||
autoCompleteResults.addAll(listEmailAddressFromServer);
|
||||
|
||||
final listEmailAddressFromDevice = resultExecutions[1].fold(
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,10 +125,17 @@ class ContactController extends BaseController {
|
||||
_getDeviceContactSuggestionsInteractor = getBinding<GetDeviceContactSuggestionsInteractor>();
|
||||
|
||||
if (_contactSuggestionSource == ContactSuggestionSource.all) {
|
||||
if (_getAllAutoCompleteInteractor == null && _getDeviceContactSuggestionsInteractor == null) {
|
||||
return <EmailAddress>[];
|
||||
if (_getAllAutoCompleteInteractor != null) {
|
||||
return await _getAllAutoCompleteInteractor!
|
||||
.execute(AutoCompletePattern(word: query, limit: 30, accountId: _accountId))
|
||||
.then((value) => value.fold(
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetAutoCompleteSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]
|
||||
));
|
||||
} else if (_getDeviceContactSuggestionsInteractor != null) {
|
||||
final listEmailAddress = await _getDeviceContactSuggestionsInteractor!
|
||||
return await _getDeviceContactSuggestionsInteractor!
|
||||
.execute(AutoCompletePattern(word: query, limit: 30, accountId: _accountId))
|
||||
.then((value) => value.fold(
|
||||
(failure) => <EmailAddress>[],
|
||||
@@ -136,30 +143,22 @@ class ContactController extends BaseController {
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]
|
||||
));
|
||||
return listEmailAddress;
|
||||
} else {
|
||||
return <EmailAddress>[];
|
||||
}
|
||||
|
||||
final listEmailAddress = await _getAllAutoCompleteInteractor!
|
||||
.execute(AutoCompletePattern(word: query, limit: 30, accountId: _accountId))
|
||||
.then((value) => value.fold(
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetAutoCompleteSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]));
|
||||
return listEmailAddress;
|
||||
} else {
|
||||
if (_getAutoCompleteInteractor == null) {
|
||||
return <EmailAddress>[];
|
||||
}
|
||||
|
||||
final listEmailAddress = await _getAutoCompleteInteractor!
|
||||
} else {
|
||||
return await _getAutoCompleteInteractor!
|
||||
.execute(AutoCompletePattern(word: query, limit: 30, accountId: _accountId))
|
||||
.then((value) => value.fold(
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetAutoCompleteSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]));
|
||||
return listEmailAddress;
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetAutoCompleteSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -422,8 +422,7 @@ class MailboxAPI with HandleSetErrorMixin {
|
||||
SetMailboxResponse.deserialize
|
||||
);
|
||||
|
||||
final listEntriesErrors = handleSetResponse([createResponse]);
|
||||
final mapErrors = Map.fromEntries(listEntriesErrors);
|
||||
final mapErrors = handleSetResponse([createResponse]);
|
||||
|
||||
if (mapErrors.isNotEmpty) {
|
||||
throw SetMailboxMethodException(mapErrors);
|
||||
@@ -495,9 +494,7 @@ class MailboxAPI with HandleSetErrorMixin {
|
||||
SetMailboxResponse.deserialize
|
||||
);
|
||||
|
||||
final listEntriesErrors = handleSetResponse([updateResponse]);
|
||||
final mapErrors = Map.fromEntries(listEntriesErrors);
|
||||
|
||||
final mapErrors = handleSetResponse([updateResponse]);
|
||||
if (mapErrors.isNotEmpty) {
|
||||
throw SetMailboxMethodException(mapErrors);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import 'package:jmap_dart_client/jmap/core/properties/properties.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
import 'package:model/mailbox/mailbox_property.dart';
|
||||
import 'package:model/mailbox/presentation_mailbox.dart';
|
||||
|
||||
class MailboxConstants {
|
||||
static final propertiesDefault = Properties({
|
||||
@@ -16,4 +18,14 @@ class MailboxConstants {
|
||||
MailboxProperty.myRights,
|
||||
MailboxProperty.namespace
|
||||
});
|
||||
|
||||
static final List<Role> defaultMailboxRoles = [
|
||||
PresentationMailbox.roleInbox,
|
||||
PresentationMailbox.roleOutbox,
|
||||
PresentationMailbox.roleDrafts,
|
||||
PresentationMailbox.roleSent,
|
||||
PresentationMailbox.roleTrash,
|
||||
PresentationMailbox.roleSpam,
|
||||
PresentationMailbox.roleTemplates,
|
||||
];
|
||||
}
|
||||
@@ -64,7 +64,6 @@ import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_catego
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_node.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/model/mailbox_tree_builder.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/model/open_mailbox_view_event.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/utils/mailbox_constants.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/presentation/utils/mailbox_utils.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox_creator/domain/usecases/verify_name_interactor.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox_creator/presentation/model/mailbox_creator_arguments.dart';
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
import 'package:jmap_dart_client/jmap/mail/mailbox/mailbox.dart';
|
||||
import 'package:model/mailbox/presentation_mailbox.dart';
|
||||
|
||||
class MailboxConstants {
|
||||
static final List<Role> defaultMailboxRoles = [
|
||||
PresentationMailbox.roleInbox,
|
||||
PresentationMailbox.roleOutbox,
|
||||
PresentationMailbox.roleDrafts,
|
||||
PresentationMailbox.roleSent,
|
||||
PresentationMailbox.roleTrash,
|
||||
PresentationMailbox.roleSpam,
|
||||
PresentationMailbox.roleTemplates,
|
||||
];
|
||||
}
|
||||
+20
-21
@@ -198,10 +198,17 @@ class AdvancedFilterController extends BaseController {
|
||||
_getDeviceContactSuggestionsInteractor = getBinding<GetDeviceContactSuggestionsInteractor>();
|
||||
|
||||
if (_contactSuggestionSource == ContactSuggestionSource.all) {
|
||||
if (_getAllAutoCompleteInteractor == null && _getDeviceContactSuggestionsInteractor == null) {
|
||||
return <EmailAddress>[];
|
||||
if (_getAllAutoCompleteInteractor != null) {
|
||||
return await _getAllAutoCompleteInteractor!
|
||||
.execute(AutoCompletePattern(word: word, accountId: _mailboxDashBoardController.accountId.value))
|
||||
.then((value) => value.fold(
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetAutoCompleteSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]
|
||||
));
|
||||
} else if (_getDeviceContactSuggestionsInteractor != null) {
|
||||
final listEmailAddress = await _getDeviceContactSuggestionsInteractor!
|
||||
return await _getDeviceContactSuggestionsInteractor!
|
||||
.execute(AutoCompletePattern(word: word, accountId: _mailboxDashBoardController.accountId.value))
|
||||
.then((value) => value.fold(
|
||||
(failure) => <EmailAddress>[],
|
||||
@@ -209,30 +216,22 @@ class AdvancedFilterController extends BaseController {
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]
|
||||
));
|
||||
return listEmailAddress;
|
||||
} else {
|
||||
return <EmailAddress>[];
|
||||
}
|
||||
|
||||
final listEmailAddress = await _getAllAutoCompleteInteractor!
|
||||
.execute(AutoCompletePattern(word: word, accountId: _mailboxDashBoardController.accountId.value))
|
||||
.then((value) => value.fold(
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetAutoCompleteSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]));
|
||||
return listEmailAddress;
|
||||
} else {
|
||||
if (_getAutoCompleteInteractor == null) {
|
||||
return <EmailAddress>[];
|
||||
}
|
||||
|
||||
final listEmailAddress = await _getAutoCompleteInteractor!
|
||||
} else {
|
||||
return await _getAutoCompleteInteractor!
|
||||
.execute(AutoCompletePattern(word: word, accountId: _mailboxDashBoardController.accountId.value))
|
||||
.then((value) => value.fold(
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetAutoCompleteSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]));
|
||||
return listEmailAddress;
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetAutoCompleteSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+16
-16
@@ -59,30 +59,29 @@ class ForwardRecipientController {
|
||||
_getDeviceContactSuggestionsInteractor = getBinding<GetDeviceContactSuggestionsInteractor>();
|
||||
|
||||
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))
|
||||
.then((value) => value.fold(
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetDeviceContactSuggestionsSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]
|
||||
));
|
||||
return listEmailAddress;
|
||||
} else {
|
||||
if (_getAllAutoCompleteInteractor != null) {
|
||||
return await _getAllAutoCompleteInteractor!
|
||||
.execute(AutoCompletePattern(word: word, accountId: _accountId))
|
||||
.then((value) => value.fold(
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetAutoCompleteSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]));
|
||||
: <EmailAddress>[]
|
||||
));
|
||||
} else if (_getDeviceContactSuggestionsInteractor != null) {
|
||||
return await _getDeviceContactSuggestionsInteractor!
|
||||
.execute(AutoCompletePattern(word: word, accountId: _accountId))
|
||||
.then((value) => value.fold(
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetDeviceContactSuggestionsSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]
|
||||
));
|
||||
} else {
|
||||
return <EmailAddress>[];
|
||||
}
|
||||
} else {
|
||||
if (_getAutoCompleteInteractor == null) {
|
||||
log('ForwardRecipientController::getAutoCompleteSuggestion(): _getAutoCompleteInteractor is NULL');
|
||||
return <EmailAddress>[];
|
||||
} else {
|
||||
return await _getAutoCompleteInteractor!
|
||||
@@ -91,7 +90,8 @@ class ForwardRecipientController {
|
||||
(failure) => <EmailAddress>[],
|
||||
(success) => success is GetAutoCompleteSuccess
|
||||
? success.listEmailAddress
|
||||
: <EmailAddress>[]));
|
||||
: <EmailAddress>[]
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user