diff --git a/lib/features/push_notification/presentation/bindings/fcm_interactor_bindings.dart b/lib/features/push_notification/presentation/bindings/fcm_interactor_bindings.dart index 0b9f9abd3..92f340bbf 100644 --- a/lib/features/push_notification/presentation/bindings/fcm_interactor_bindings.dart +++ b/lib/features/push_notification/presentation/bindings/fcm_interactor_bindings.dart @@ -13,7 +13,6 @@ import 'package:tmail_ui_user/features/push_notification/domain/usecases/get_dev import 'package:tmail_ui_user/features/push_notification/domain/usecases/get_email_changes_to_push_notification_interactor.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/get_email_state_to_refresh_interactor.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/get_firebase_subscription_interactor.dart'; -import 'package:tmail_ui_user/features/push_notification/domain/usecases/get_fcm_token_cache_interactor.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/get_mailbox_state_to_refresh_interactor.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/get_stored_email_delivery_state_interactor.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/register_new_token_interactor.dart'; diff --git a/lib/features/push_notification/presentation/controller/fcm_controller.dart b/lib/features/push_notification/presentation/controller/fcm_controller.dart index 613ded819..82e9850d2 100644 --- a/lib/features/push_notification/presentation/controller/fcm_controller.dart +++ b/lib/features/push_notification/presentation/controller/fcm_controller.dart @@ -9,7 +9,6 @@ import 'package:core/utils/app_logger.dart'; import 'package:dartz/dartz.dart'; import 'package:fcm/model/type_name.dart'; import 'package:firebase_messaging/firebase_messaging.dart'; -import 'package:get/get.dart'; import 'package:jmap_dart_client/jmap/account_id.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:jmap_dart_client/jmap/push/state_change.dart'; @@ -35,6 +34,7 @@ import 'package:tmail_ui_user/features/push_notification/presentation/utils/fcm_ import 'package:tmail_ui_user/features/session/domain/state/get_session_state.dart'; import 'package:tmail_ui_user/features/session/domain/usecases/get_session_interactor.dart'; import 'package:tmail_ui_user/main/bindings/main_bindings.dart'; +import 'package:tmail_ui_user/main/routes/route_navigation.dart'; class FcmController extends BaseController { @@ -171,10 +171,10 @@ class FcmController extends BaseController { Future _getInteractorBindings() { try { - _getAuthenticatedAccountInteractor = Get.find(); - _dynamicUrlInterceptors = Get.find(); - _authorizationInterceptors = Get.find(); - _getSessionInteractor = Get.find(); + _getAuthenticatedAccountInteractor = getBinding(); + _dynamicUrlInterceptors = getBinding(); + _authorizationInterceptors = getBinding(); + _getSessionInteractor = getBinding(); FcmTokenHandler.instance.initialize(); } catch (e) { logError('FcmController::_getBindings(): ${e.toString()}'); diff --git a/lib/features/push_notification/presentation/listener/email_change_listener.dart b/lib/features/push_notification/presentation/listener/email_change_listener.dart index edf053408..b327160a4 100644 --- a/lib/features/push_notification/presentation/listener/email_change_listener.dart +++ b/lib/features/push_notification/presentation/listener/email_change_listener.dart @@ -2,7 +2,6 @@ import 'package:core/presentation/state/failure.dart'; import 'package:core/presentation/state/success.dart'; import 'package:core/utils/app_logger.dart'; -import 'package:get/get.dart'; import 'package:jmap_dart_client/jmap/account_id.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:model/email/presentation_email.dart'; @@ -22,6 +21,7 @@ import 'package:tmail_ui_user/features/push_notification/presentation/action/fcm import 'package:tmail_ui_user/features/push_notification/presentation/listener/change_listener.dart'; import 'package:tmail_ui_user/features/push_notification/presentation/notification/local_notification_manager.dart'; import 'package:tmail_ui_user/features/thread/domain/constants/thread_constants.dart'; +import 'package:tmail_ui_user/main/routes/route_navigation.dart'; class EmailChangeListener extends ChangeListener { @@ -37,12 +37,12 @@ class EmailChangeListener extends ChangeListener { EmailChangeListener._internal() { try { - _dashBoardController = Get.find(); - _getStoredEmailStateInteractor = Get.find(); - _getStoredEmailDeliveryStateInteractor = Get.find(); - _storeEmailDeliveryStateInteractor = Get.find(); - _getEmailChangesToPushNotificationInteractor = Get.find(); - _storeEmailStateToRefreshInteractor = Get.find(); + _dashBoardController = getBinding(); + _getStoredEmailStateInteractor = getBinding(); + _getStoredEmailDeliveryStateInteractor = getBinding(); + _storeEmailDeliveryStateInteractor = getBinding(); + _getEmailChangesToPushNotificationInteractor = getBinding(); + _storeEmailStateToRefreshInteractor = getBinding(); } catch (e) { logError('EmailChangeListener::_internal(): IS NOT REGISTERED: ${e.toString()}'); }