Cache LinagoraEcosystem to avoid multiple network calls

This commit is contained in:
Théo Poizat
2026-02-26 10:43:18 +01:00
committed by Dat H. Pham
parent 71901b2640
commit 6d8d10cf26
4 changed files with 164 additions and 22 deletions
+2
View File
@@ -48,6 +48,7 @@ import 'package:tmail_ui_user/features/push_notification/domain/usecases/get_sto
import 'package:tmail_ui_user/features/push_notification/presentation/bindings/fcm_interactor_bindings.dart';
import 'package:tmail_ui_user/features/push_notification/presentation/bindings/web_socket_interactor_bindings.dart';
import 'package:tmail_ui_user/features/push_notification/presentation/config/fcm_configuration.dart';
import 'package:tmail_ui_user/features/mailbox_dashboard/data/cache/linagora_ecosystem_cache.dart';
import 'package:tmail_ui_user/features/push_notification/presentation/controller/fcm_message_controller.dart';
import 'package:tmail_ui_user/features/push_notification/presentation/controller/fcm_token_controller.dart';
import 'package:tmail_ui_user/features/push_notification/presentation/controller/web_socket_controller.dart';
@@ -596,6 +597,7 @@ abstract class BaseController extends GetxController
authorizationInterceptors.clear();
authorizationIsolateInterceptors.clear();
await cachingManager.closeHive();
LinagoraEcosystemCache().clearCache();
} catch (e) {
logWarning('BaseController::clearAllData: Cannot clear all data: $e');
}