TF-1604: Add requiredCapabilities support TeamMailbox for GetEmailMethod

(cherry picked from commit 3922303e63a8e910511361019a54ea13801e3f92)
This commit is contained in:
HuyNguyen
2023-03-21 23:29:45 +07:00
committed by Dat Vu
parent 890ca4c8cd
commit 8a28225e05
41 changed files with 516 additions and 197 deletions
@@ -293,6 +293,7 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
}
void _getEmailContentAction(EmailId emailId) async {
final session = mailboxDashBoardController.sessionCurrent;
final accountId = mailboxDashBoardController.accountId.value;
final baseDownloadUrl = mailboxDashBoardController.sessionCurrent?.getDownloadUrl(jmapUrl: _dynamicUrlInterceptors.jmapUrl);
final emailLoaded = emailSupervisorController.getEmailInQueueByEmailId(emailId);
@@ -305,8 +306,8 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
emailLoaded.emailContentsDisplayed,
emailLoaded.attachments,
emailLoaded.emailCurrent))));
} else if (accountId != null && baseDownloadUrl != null) {
consumeState(_getEmailContentInteractor.execute(accountId, emailId, baseDownloadUrl));
} else if (session != null && accountId != null && baseDownloadUrl != null) {
consumeState(_getEmailContentInteractor.execute(session, accountId, emailId, baseDownloadUrl));
}
}