TF-1718 Implement unsubscribeMail on Jmap server
Signed-off-by: dab246 <tdvu@linagora.com> (cherry picked from commit 0f61a97aab513cda75c65e3c92ebcf8f6290b6ec)
This commit is contained in:
@@ -14,6 +14,7 @@ class EmailRequest with EquatableMixin {
|
||||
final IdentityId? identityId;
|
||||
final EmailActionType emailActionType;
|
||||
final String? storedSendingId;
|
||||
final EmailId? previousEmailId;
|
||||
|
||||
EmailRequest({
|
||||
required this.email,
|
||||
@@ -23,6 +24,7 @@ class EmailRequest with EquatableMixin {
|
||||
this.emailIdDestroyed,
|
||||
this.emailIdAnsweredOrForwarded,
|
||||
this.storedSendingId,
|
||||
this.previousEmailId,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -34,6 +36,7 @@ class EmailRequest with EquatableMixin {
|
||||
emailIdAnsweredOrForwarded,
|
||||
emailActionType,
|
||||
storedSendingId,
|
||||
previousEmailId,
|
||||
];
|
||||
|
||||
bool get isEmailAnswered => emailIdAnsweredOrForwarded != null &&
|
||||
|
||||
@@ -12,18 +12,18 @@ class SendEmailLoading extends UIState {}
|
||||
|
||||
class SendEmailSuccess extends UIActionState {
|
||||
|
||||
final String? storedSendingId;
|
||||
final EmailRequest emailRequest;
|
||||
|
||||
SendEmailSuccess({
|
||||
jmap.State? currentEmailState,
|
||||
jmap.State? currentMailboxState,
|
||||
this.storedSendingId,
|
||||
required this.emailRequest,
|
||||
}) : super(currentEmailState, currentMailboxState);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
...super.props,
|
||||
storedSendingId,
|
||||
emailRequest,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class SendEmailInteractor {
|
||||
SendEmailSuccess(
|
||||
currentEmailState: currentEmailState,
|
||||
currentMailboxState: currentMailboxState,
|
||||
storedSendingId: emailRequest.storedSendingId
|
||||
emailRequest: emailRequest
|
||||
)
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -489,9 +489,7 @@ class ComposerController extends BaseController {
|
||||
isInitialRecipient.value = true;
|
||||
toAddressExpandMode.value = ExpandMode.COLLAPSE;
|
||||
}
|
||||
if (arguments.body?.isNotEmpty == true) {
|
||||
_getEmailContentFromMailtoUri(arguments.body!);
|
||||
}
|
||||
_getEmailContentFromMailtoUri(arguments.body ?? '');
|
||||
_updateStatusEmailSendButton();
|
||||
break;
|
||||
case EmailActionType.reply:
|
||||
@@ -537,9 +535,7 @@ class ComposerController extends BaseController {
|
||||
isInitialRecipient.value = true;
|
||||
toAddressExpandMode.value = ExpandMode.COLLAPSE;
|
||||
}
|
||||
if (arguments.body?.isNotEmpty == true) {
|
||||
_getEmailContentFromUnsubscribeMailtoLink(arguments.body!);
|
||||
}
|
||||
_getEmailContentFromUnsubscribeMailtoLink(arguments.body ?? '');
|
||||
_updateStatusEmailSendButton();
|
||||
break;
|
||||
default:
|
||||
@@ -969,7 +965,8 @@ class ComposerController extends BaseController {
|
||||
? arguments.presentationEmail?.id
|
||||
: null,
|
||||
emailIdAnsweredOrForwarded: arguments.presentationEmail?.id,
|
||||
emailActionType: arguments.emailActionType
|
||||
emailActionType: arguments.emailActionType,
|
||||
previousEmailId: arguments.previousEmailId,
|
||||
);
|
||||
|
||||
final mailboxRequest = mailboxDashBoardController.outboxMailbox?.id == null
|
||||
|
||||
Reference in New Issue
Block a user