TF-3406 Add edit as new email feature

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
DatDang
2025-01-20 19:40:43 +07:00
committed by Dat H. Pham
parent 412431ceaa
commit 3ddb81a8c4
15 changed files with 161 additions and 9 deletions
@@ -1205,6 +1205,9 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
case EmailActionType.downloadMessageAsEML:
_downloadMessageAsEML(presentationEmail);
break;
case EmailActionType.composeFromPresentationEmail:
_composeFromPresentationEmail(presentationEmail);
break;
default:
break;
}
@@ -1906,6 +1909,14 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
downloadAttachmentForWeb(emlAttachment);
}
void _composeFromPresentationEmail(PresentationEmail presentationEmail) {
if (accountId == null || session == null) return;
mailboxDashBoardController.goToComposer(
ComposerArguments.fromPresentationEmail(presentationEmail),
);
}
void handleDownloadAttachmentAction(BuildContext context, Attachment attachment) {
if (PlatformInfo.isWeb) {
downloadAttachmentForWeb(attachment);