TF-3449 Update Mark as Important state when edit as new email
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -608,18 +608,19 @@ class ComposerController extends BaseController
|
|||||||
);
|
);
|
||||||
|
|
||||||
switch(arguments.emailActionType) {
|
switch(arguments.emailActionType) {
|
||||||
case EmailActionType.composeFromPresentationEmail:
|
case EmailActionType.editAsNewEmail:
|
||||||
_initEmailAddress(
|
_initEmailAddress(
|
||||||
presentationEmail: arguments.presentationEmail!,
|
presentationEmail: arguments.presentationEmail!,
|
||||||
actionType: EmailActionType.composeFromPresentationEmail
|
actionType: EmailActionType.editAsNewEmail
|
||||||
);
|
);
|
||||||
_initSubjectEmail(
|
_initSubjectEmail(
|
||||||
presentationEmail: arguments.presentationEmail!,
|
presentationEmail: arguments.presentationEmail!,
|
||||||
actionType: EmailActionType.composeFromPresentationEmail
|
actionType: EmailActionType.editAsNewEmail
|
||||||
);
|
);
|
||||||
_getEmailContentOfEmailDrafts(
|
_getEmailContentOfEmailDrafts(
|
||||||
emailId: arguments.presentationEmail!.id!,
|
emailId: arguments.presentationEmail!.id!,
|
||||||
);
|
);
|
||||||
|
isMarkAsImportant.value = arguments.presentationEmail!.isMarkAsImportant;
|
||||||
break;
|
break;
|
||||||
case EmailActionType.editDraft:
|
case EmailActionType.editDraft:
|
||||||
_initEmailAddress(
|
_initEmailAddress(
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ extension EmailActionTypeExtension on EmailActionType {
|
|||||||
case EmailActionType.editDraft:
|
case EmailActionType.editDraft:
|
||||||
case EmailActionType.editSendingEmail:
|
case EmailActionType.editSendingEmail:
|
||||||
case EmailActionType.reopenComposerBrowser:
|
case EmailActionType.reopenComposerBrowser:
|
||||||
case EmailActionType.composeFromPresentationEmail:
|
case EmailActionType.editAsNewEmail:
|
||||||
return subject;
|
return subject;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
@@ -146,7 +146,7 @@ extension EmailActionTypeExtension on EmailActionType {
|
|||||||
return imagePaths.icMailboxArchived;
|
return imagePaths.icMailboxArchived;
|
||||||
case EmailActionType.downloadMessageAsEML:
|
case EmailActionType.downloadMessageAsEML:
|
||||||
return imagePaths.icDownloadAttachment;
|
return imagePaths.icDownloadAttachment;
|
||||||
case EmailActionType.composeFromPresentationEmail:
|
case EmailActionType.editAsNewEmail:
|
||||||
return imagePaths.icEdit;
|
return imagePaths.icEdit;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
@@ -169,7 +169,7 @@ extension EmailActionTypeExtension on EmailActionType {
|
|||||||
return AppLocalizations.of(context).archiveMessage;
|
return AppLocalizations.of(context).archiveMessage;
|
||||||
case EmailActionType.downloadMessageAsEML:
|
case EmailActionType.downloadMessageAsEML:
|
||||||
return AppLocalizations.of(context).downloadMessageAsEML;
|
return AppLocalizations.of(context).downloadMessageAsEML;
|
||||||
case EmailActionType.composeFromPresentationEmail:
|
case EmailActionType.editAsNewEmail:
|
||||||
return AppLocalizations.of(context).editAsNewEmail;
|
return AppLocalizations.of(context).editAsNewEmail;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class MobileEditorView extends StatelessWidget with EditorViewMixin {
|
|||||||
case EmailActionType.reopenComposerBrowser:
|
case EmailActionType.reopenComposerBrowser:
|
||||||
case EmailActionType.composeFromMailtoUri:
|
case EmailActionType.composeFromMailtoUri:
|
||||||
case EmailActionType.composeFromUnsubscribeMailtoLink:
|
case EmailActionType.composeFromUnsubscribeMailtoLink:
|
||||||
case EmailActionType.composeFromPresentationEmail:
|
case EmailActionType.editAsNewEmail:
|
||||||
if (contentViewState == null) {
|
if (contentViewState == null) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ class WebEditorView extends StatelessWidget with EditorViewMixin {
|
|||||||
case EmailActionType.reopenComposerBrowser:
|
case EmailActionType.reopenComposerBrowser:
|
||||||
case EmailActionType.composeFromUnsubscribeMailtoLink:
|
case EmailActionType.composeFromUnsubscribeMailtoLink:
|
||||||
case EmailActionType.composeFromMailtoUri:
|
case EmailActionType.composeFromMailtoUri:
|
||||||
case EmailActionType.composeFromPresentationEmail:
|
case EmailActionType.editAsNewEmail:
|
||||||
if (contentViewState == null) {
|
if (contentViewState == null) {
|
||||||
return const SizedBox.shrink();
|
return const SizedBox.shrink();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1422,8 +1422,8 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
|||||||
case EmailActionType.downloadMessageAsEML:
|
case EmailActionType.downloadMessageAsEML:
|
||||||
_downloadMessageAsEML(presentationEmail);
|
_downloadMessageAsEML(presentationEmail);
|
||||||
break;
|
break;
|
||||||
case EmailActionType.composeFromPresentationEmail:
|
case EmailActionType.editAsNewEmail:
|
||||||
_composeFromPresentationEmail(presentationEmail);
|
_editAsNewEmail(presentationEmail);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -2145,11 +2145,11 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
|
|||||||
downloadAttachmentForWeb(emlAttachment);
|
downloadAttachmentForWeb(emlAttachment);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _composeFromPresentationEmail(PresentationEmail presentationEmail) {
|
void _editAsNewEmail(PresentationEmail presentationEmail) {
|
||||||
if (accountId == null || session == null) return;
|
if (accountId == null || session == null) return;
|
||||||
|
|
||||||
mailboxDashBoardController.goToComposer(
|
mailboxDashBoardController.goToComposer(
|
||||||
ComposerArguments.fromPresentationEmail(presentationEmail),
|
ComposerArguments.editAsNewEmail(presentationEmail),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -507,7 +507,7 @@ class EmailView extends GetWidget<SingleEmailController> {
|
|||||||
EmailActionType.archiveMessage,
|
EmailActionType.archiveMessage,
|
||||||
if (PlatformInfo.isWeb && PlatformInfo.isCanvasKit)
|
if (PlatformInfo.isWeb && PlatformInfo.isCanvasKit)
|
||||||
EmailActionType.downloadMessageAsEML,
|
EmailActionType.downloadMessageAsEML,
|
||||||
EmailActionType.composeFromPresentationEmail,
|
EmailActionType.editAsNewEmail,
|
||||||
];
|
];
|
||||||
|
|
||||||
if (position == null) {
|
if (position == null) {
|
||||||
|
|||||||
@@ -105,9 +105,9 @@ class ComposerArguments extends RouterArguments {
|
|||||||
presentationEmail: presentationEmail,
|
presentationEmail: presentationEmail,
|
||||||
);
|
);
|
||||||
|
|
||||||
factory ComposerArguments.fromPresentationEmail(PresentationEmail presentationEmail) =>
|
factory ComposerArguments.editAsNewEmail(PresentationEmail presentationEmail) =>
|
||||||
ComposerArguments(
|
ComposerArguments(
|
||||||
emailActionType: EmailActionType.composeFromPresentationEmail,
|
emailActionType: EmailActionType.editAsNewEmail,
|
||||||
presentationEmail: presentationEmail,
|
presentationEmail: presentationEmail,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ mixin EmailActionController {
|
|||||||
|
|
||||||
void editAsNewEmail(PresentationEmail presentationEmail) {
|
void editAsNewEmail(PresentationEmail presentationEmail) {
|
||||||
mailboxDashBoardController.goToComposer(
|
mailboxDashBoardController.goToComposer(
|
||||||
ComposerArguments.fromPresentationEmail(presentationEmail),
|
ComposerArguments.editAsNewEmail(presentationEmail),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ enum EmailActionType {
|
|||||||
composeFromFileShared,
|
composeFromFileShared,
|
||||||
composeFromEmailAddress,
|
composeFromEmailAddress,
|
||||||
composeFromMailtoUri,
|
composeFromMailtoUri,
|
||||||
composeFromPresentationEmail,
|
editAsNewEmail,
|
||||||
reopenComposerBrowser,
|
reopenComposerBrowser,
|
||||||
moveToTrash,
|
moveToTrash,
|
||||||
deletePermanently,
|
deletePermanently,
|
||||||
|
|||||||
Reference in New Issue
Block a user