fix(cnb): skip local email cache and add safe email/state cache clearing

(cherry picked from commit 0e7f589df58240badc1d2340e9856882aa075b63)
This commit is contained in:
dab246
2025-12-02 11:52:48 +07:00
committed by Dat H. Pham
parent 9d4f6e73d2
commit b3e5ab0df4
21 changed files with 141 additions and 294 deletions
@@ -612,10 +612,7 @@ class MailboxDashBoardController extends ReloadableController
Future<void> onBeforeUnloadBrowserListener(html.Event event) async {
log('MailboxDashBoardController::onBeforeUnloadBrowserListener:event = ${event.runtimeType} | hasComposer = ${twakeAppManager.hasComposer} | isExecutingBeforeReconnect = ${twakeAppManager.isExecutingBeforeReconnect}');
if (PlatformInfo.isWeb) {
await cachingManager.clearAllEmailAndStateCache(
accountId: accountId.value,
userName: sessionCurrent?.username,
);
await cachingManager.clearAllEmailAndStateCache();
}
if (event is html.BeforeUnloadEvent &&