TF-437 Handle mailbox/changes in foreground

This commit is contained in:
dab246
2022-11-30 11:34:19 +07:00
committed by Dat H. Pham
parent 045c7383e6
commit 49069a595c
5 changed files with 90 additions and 0 deletions
@@ -257,12 +257,17 @@ class MailboxController extends BaseMailboxController {
});
dashboardActionWorker = ever(mailboxDashBoardController.dashBoardAction, (action) {
log('MailboxController::_registerListenerWorker():action: $action');
if (action is ClearSearchEmailAction) {
_switchBackToMailboxDefault();
} else if (action is SelectMailboxDefaultAction) {
if (mailboxDashBoardController.selectedMailbox.value == null) {
_switchBackToMailboxDefault();
}
} else if (action is RefreshChangeMailboxAction) {
if (action.newState != _currentMailboxState) {
refreshMailboxChanges();
}
}
});
}