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