TF-48 Implement compose and send email with simple text

This commit is contained in:
dab246
2021-09-08 15:14:19 +07:00
committed by Dat H. Pham
parent db4d262a8c
commit 0cd7552ad2
40 changed files with 466 additions and 114 deletions
@@ -67,14 +67,17 @@ class EmailController extends BaseController {
emailAddressExpandMode.value = expandMode;
}
bool canComposeEmail() => mailboxDashBoardController.sessionCurrent != null
&& mailboxDashBoardController.userProfile.value != null
&& mailboxDashBoardController.mapMailboxId.containsKey(PresentationMailbox.roleOutbox)
&& mailboxDashBoardController.selectedEmail.value != null;
void goToThreadView(BuildContext context) {
Get.back();
}
void pressEmailAction(EmailActionType emailActionType) {
if (mailboxDashBoardController.selectedEmail.value != null
&& mailboxDashBoardController.sessionCurrent != null
&& mailboxDashBoardController.userProfile.value != null) {
if (canComposeEmail()) {
Get.toNamed(
AppRoutes.COMPOSER,
arguments: ComposerArguments(
@@ -82,7 +85,8 @@ class EmailController extends BaseController {
presentationEmail: mailboxDashBoardController.selectedEmail.value!,
emailContent: emailContent,
session: mailboxDashBoardController.sessionCurrent!,
userProfile: mailboxDashBoardController.userProfile.value!));
userProfile: mailboxDashBoardController.userProfile.value!,
mapMailboxId: mailboxDashBoardController.mapMailboxId));
}
}
}