fix(cnb): delete all cache before execute logout

(cherry picked from commit 7aa346984f9f1a65005a8cc8c0670fdade6502e3)
This commit is contained in:
dab246
2025-11-27 02:43:13 +07:00
committed by Dat H. Pham
parent 5cbf189ffe
commit 363fe0aa58
2 changed files with 23 additions and 4 deletions
+10 -4
View File
@@ -73,12 +73,20 @@ class CachingManager {
);
Future<void> clearAll() async {
await Future.wait([
clearMailDataCached(),
_fcmCacheManager.clear(),
_accountCacheManager.clear(),
if (PlatformInfo.isIOS)
_keychainSharingManager.delete()
], eagerError: true);
}
Future<void> clearMailDataCached() async {
await Future.wait([
_stateCacheManager.clear(),
_mailboxCacheManager.clear(),
_emailCacheManager.clear(),
_fcmCacheManager.clear(),
_accountCacheManager.clear(),
if (PlatformInfo.isMobile)
...[
_sessionCacheManager.clear(),
@@ -86,8 +94,6 @@ class CachingManager {
_openedEmailCacheManager.clear(),
_sendingEmailCacheManager.clearAllSendingEmails(),
],
if (PlatformInfo.isIOS)
_keychainSharingManager.delete()
], eagerError: true);
}