TF-942 Auto generate missing Outbox mailbox before send email

This commit is contained in:
dab246
2022-09-23 12:55:38 +07:00
committed by Dat H. Pham
parent 1722543808
commit 106a0c4a37
16 changed files with 205 additions and 85 deletions
@@ -118,10 +118,13 @@ class MailboxDashBoardController extends ReloadableController {
final composerOverlayState = ComposerOverlayState.inActive.obs;
final viewStateMarkAsReadMailbox = Rx<Either<Failure, Success>>(Right(UIState.idle));
final vacationResponse = Rxn<VacationResponse>();
Session? sessionCurrent;
Map<Role, MailboxId> mapDefaultMailboxIdByRole = {};
Map<MailboxId, PresentationMailbox> mapMailboxById = {};
PresentationMailbox? outboxMailbox;
RouterArguments? routerArguments;
late StreamSubscription _connectivityStreamSubscription;
late StreamSubscription _emailReceiveManagerStreamSubscription;
late StreamSubscription _fileReceiveManagerStreamSubscription;
@@ -237,7 +240,7 @@ class MailboxDashBoardController extends ReloadableController {
if (currentOverlayContext != null && currentContext != null) {
_appToast.showToastWithIcon(
currentOverlayContext!,
textColor: AppColor.toastSuccessBackgroundColor,
textColor: AppColor.primaryColor,
message: AppLocalizations.of(currentContext!).message_has_been_sent_successfully,
icon: _imagePaths.icSendToast);
}
@@ -381,6 +384,11 @@ class MailboxDashBoardController extends ReloadableController {
mapMailboxById = newMapMailboxById;
}
void setOutboxMailbox(PresentationMailbox? newOutbox) {
outboxMailbox = newOutbox;
log('MailboxDashBoardController::setOutboxMailbox(): $newOutbox');
}
void setSelectedMailbox(PresentationMailbox? newPresentationMailbox) {
selectedMailbox.value = newPresentationMailbox;
}