TF-1667 Trigger show spam report banner when mailboxes changed

(cherry picked from commit 6530da92012774a8bd318cd1c87cf1f503feef69)
This commit is contained in:
dab246
2023-04-05 15:33:32 +07:00
committed by Dat Vu
parent 72055cfccb
commit e81296bbaf
6 changed files with 52 additions and 26 deletions
@@ -170,8 +170,10 @@ class MailboxController extends BaseMailboxController with MailboxActionHandlerM
(success) async {
if (success is GetAllMailboxSuccess) {
_initialMailboxVariableStorage();
mailboxDashBoardController.getSpamReportBanner();
} else if (success is RefreshChangesAllMailboxSuccess) {
_initialMailboxVariableStorage(isRefreshChange: true);
mailboxDashBoardController.refreshSpamReportBanner();
} else if (success is CreateNewMailboxSuccess) {
_createNewMailboxSuccess(success);
} else if (success is DeleteMultipleMailboxAllSuccess) {
@@ -291,7 +293,6 @@ class MailboxController extends BaseMailboxController with MailboxActionHandlerM
}
void _refreshMailboxChanges({jmap.State? currentMailboxState}) {
mailboxDashBoardController.showSpamReportBanner();
log('MailboxController::_refreshMailboxChanges(): currentMailboxState: $currentMailboxState');
final newMailboxState = currentMailboxState ?? this.currentMailboxState;
log('MailboxController::_refreshMailboxChanges(): newMailboxState: $newMailboxState');