TF-3449 Set priority headers in email object when send or save draft email
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -660,10 +660,10 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: main
|
||||
resolved-ref: "278183b54ccfcda7396273c556609d28194e34f1"
|
||||
resolved-ref: "00b8c073e9e8b6f1caa831c400a5c31e56424c08"
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.3.2"
|
||||
version: "0.3.3"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -296,10 +296,10 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: main
|
||||
resolved-ref: "278183b54ccfcda7396273c556609d28194e34f1"
|
||||
resolved-ref: "00b8c073e9e8b6f1caa831c400a5c31e56424c08"
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.3.2"
|
||||
version: "0.3.3"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
+2
-2
@@ -296,10 +296,10 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: main
|
||||
resolved-ref: "278183b54ccfcda7396273c556609d28194e34f1"
|
||||
resolved-ref: "00b8c073e9e8b6f1caa831c400a5c31e56424c08"
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.3.2"
|
||||
version: "0.3.3"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -296,10 +296,10 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: main
|
||||
resolved-ref: "278183b54ccfcda7396273c556609d28194e34f1"
|
||||
resolved-ref: "00b8c073e9e8b6f1caa831c400a5c31e56424c08"
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.3.2"
|
||||
version: "0.3.3"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -496,6 +496,7 @@ class ComposerController extends BaseController
|
||||
bccRecipients: listBccEmailAddress.toSet(),
|
||||
replyToRecipients: listReplyToEmailAddress.toSet(),
|
||||
hasRequestReadReceipt: hasRequestReadReceipt.value,
|
||||
isMarkAsImportant: isMarkAsImportant.value,
|
||||
identity: identitySelected.value,
|
||||
attachments: uploadController.attachmentsUploaded,
|
||||
inlineAttachments: uploadController.mapInlineAttachments,
|
||||
@@ -1092,6 +1093,7 @@ class ComposerController extends BaseController
|
||||
bccRecipients: listBccEmailAddress.toSet(),
|
||||
replyToRecipients: listReplyToEmailAddress.toSet(),
|
||||
hasRequestReadReceipt: hasRequestReadReceipt.value,
|
||||
isMarkAsImportant: isMarkAsImportant.value,
|
||||
identity: identitySelected.value,
|
||||
attachments: uploadController.attachmentsUploaded,
|
||||
inlineAttachments: uploadController.mapInlineAttachments,
|
||||
@@ -2358,6 +2360,7 @@ class ComposerController extends BaseController
|
||||
bccRecipients: listBccEmailAddress.toSet(),
|
||||
replyToRecipients: listReplyToEmailAddress.toSet(),
|
||||
hasRequestReadReceipt: hasRequestReadReceipt.value,
|
||||
isMarkAsImportant: isMarkAsImportant.value,
|
||||
identity: identitySelected.value,
|
||||
attachments: uploadController.attachmentsUploaded,
|
||||
inlineAttachments: uploadController.mapInlineAttachments,
|
||||
|
||||
@@ -14,6 +14,7 @@ import 'package:model/mailbox/presentation_mailbox.dart';
|
||||
import 'package:tmail_ui_user/features/composer/domain/model/email_request.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/extensions/identity_extension.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/model/create_email_request.dart';
|
||||
import 'package:tmail_ui_user/features/composer/presentation/model/mail_priority_header.dart';
|
||||
import 'package:tmail_ui_user/features/email/domain/extensions/list_attachments_extension.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox/domain/model/create_new_mailbox_request.dart';
|
||||
import 'package:tmail_ui_user/features/sending_queue/domain/extensions/sending_email_extension.dart';
|
||||
@@ -156,7 +157,16 @@ extension CreateEmailRequestExtension on CreateEmailRequest {
|
||||
: null,
|
||||
identityHeader: withIdentityHeader
|
||||
? {IndividualHeaderIdentifier.identityHeader: identity?.id?.id.value}
|
||||
: null
|
||||
: null,
|
||||
xPriorityHeader: isMarkAsImportant
|
||||
? {IndividualHeaderIdentifier.xPriorityHeader: MailPriorityHeader.asImportant().xPriority}
|
||||
: null,
|
||||
importanceHeader: isMarkAsImportant
|
||||
? {IndividualHeaderIdentifier.importanceHeader: MailPriorityHeader.asImportant().importance}
|
||||
: null,
|
||||
priorityHeader: isMarkAsImportant
|
||||
? {IndividualHeaderIdentifier.priorityHeader: MailPriorityHeader.asImportant().priority}
|
||||
: null,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ class CreateEmailRequest with EquatableMixin {
|
||||
final String subject;
|
||||
final String emailContent;
|
||||
final bool hasRequestReadReceipt;
|
||||
final bool isMarkAsImportant;
|
||||
final Set<EmailAddress>? fromSender;
|
||||
final Set<EmailAddress>? toRecipients;
|
||||
final Set<EmailAddress>? ccRecipients;
|
||||
@@ -50,6 +51,7 @@ class CreateEmailRequest with EquatableMixin {
|
||||
this.bccRecipients,
|
||||
this.replyToRecipients,
|
||||
this.hasRequestReadReceipt = true,
|
||||
this.isMarkAsImportant = false,
|
||||
this.identity,
|
||||
this.attachments,
|
||||
this.inlineAttachments,
|
||||
@@ -79,6 +81,7 @@ class CreateEmailRequest with EquatableMixin {
|
||||
replyToRecipients,
|
||||
identity,
|
||||
hasRequestReadReceipt,
|
||||
isMarkAsImportant,
|
||||
attachments,
|
||||
inlineAttachments,
|
||||
outboxMailboxId,
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class MailPriorityHeader with EquatableMixin {
|
||||
final String? xPriority;
|
||||
final String? importance;
|
||||
final String? priority;
|
||||
|
||||
MailPriorityHeader({
|
||||
this.xPriority,
|
||||
this.importance,
|
||||
this.priority,
|
||||
});
|
||||
|
||||
factory MailPriorityHeader.asImportant() => MailPriorityHeader(
|
||||
xPriority: '1',
|
||||
importance: 'high',
|
||||
priority: 'urgent',
|
||||
);
|
||||
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
xPriority,
|
||||
importance,
|
||||
priority,
|
||||
];
|
||||
}
|
||||
+2
-2
@@ -652,10 +652,10 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: main
|
||||
resolved-ref: "278183b54ccfcda7396273c556609d28194e34f1"
|
||||
resolved-ref: "00b8c073e9e8b6f1caa831c400a5c31e56424c08"
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.3.2"
|
||||
version: "0.3.3"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
+2
-2
@@ -1332,10 +1332,10 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: main
|
||||
resolved-ref: "278183b54ccfcda7396273c556609d28194e34f1"
|
||||
resolved-ref: "00b8c073e9e8b6f1caa831c400a5c31e56424c08"
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.3.2"
|
||||
version: "0.3.3"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -296,10 +296,10 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: main
|
||||
resolved-ref: "278183b54ccfcda7396273c556609d28194e34f1"
|
||||
resolved-ref: "00b8c073e9e8b6f1caa831c400a5c31e56424c08"
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.3.2"
|
||||
version: "0.3.3"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
@@ -288,10 +288,10 @@ packages:
|
||||
description:
|
||||
path: "."
|
||||
ref: main
|
||||
resolved-ref: "278183b54ccfcda7396273c556609d28194e34f1"
|
||||
resolved-ref: "00b8c073e9e8b6f1caa831c400a5c31e56424c08"
|
||||
url: "https://github.com/linagora/jmap-dart-client.git"
|
||||
source: git
|
||||
version: "0.3.2"
|
||||
version: "0.3.3"
|
||||
js:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
||||
Reference in New Issue
Block a user