TF-2134 Open composer from mailto uri

(cherry picked from commit 964013fb35ee6a7ab98f7d7c4a1146d87843dd81)
This commit is contained in:
dab246
2023-09-12 02:17:54 +07:00
committed by Dat Vu
parent 623102d96f
commit 5f053be2de
5 changed files with 24 additions and 2 deletions
@@ -470,6 +470,16 @@ class ComposerController extends BaseController {
toAddressExpandMode.value = ExpandMode.COLLAPSE;
_updateStatusEmailSendButton();
break;
case EmailActionType.composeFromMailtoURL:
if (GetUtils.isEmail(arguments.uri ?? '')) {
listToEmailAddress.add(EmailAddress(null, arguments.uri));
} else {
listToEmailAddress.add(EmailAddress(null, 'invalid'));
}
isInitialRecipient.value = true;
toAddressExpandMode.value = ExpandMode.COLLAPSE;
_updateStatusEmailSendButton();
break;
case EmailActionType.reply:
case EmailActionType.replyAll:
_initEmailAddress(