TF-437 Wrap get binding registered
This commit is contained in:
@@ -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';
|
||||
|
||||
@@ -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<void> _getInteractorBindings() {
|
||||
try {
|
||||
_getAuthenticatedAccountInteractor = Get.find<GetAuthenticatedAccountInteractor>();
|
||||
_dynamicUrlInterceptors = Get.find<DynamicUrlInterceptors>();
|
||||
_authorizationInterceptors = Get.find<AuthorizationInterceptors>();
|
||||
_getSessionInteractor = Get.find<GetSessionInteractor>();
|
||||
_getAuthenticatedAccountInteractor = getBinding<GetAuthenticatedAccountInteractor>();
|
||||
_dynamicUrlInterceptors = getBinding<DynamicUrlInterceptors>();
|
||||
_authorizationInterceptors = getBinding<AuthorizationInterceptors>();
|
||||
_getSessionInteractor = getBinding<GetSessionInteractor>();
|
||||
FcmTokenHandler.instance.initialize();
|
||||
} catch (e) {
|
||||
logError('FcmController::_getBindings(): ${e.toString()}');
|
||||
|
||||
@@ -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<MailboxDashBoardController>();
|
||||
_getStoredEmailStateInteractor = Get.find<GetStoredEmailStateInteractor>();
|
||||
_getStoredEmailDeliveryStateInteractor = Get.find<GetStoredEmailDeliveryStateInteractor>();
|
||||
_storeEmailDeliveryStateInteractor = Get.find<StoreEmailDeliveryStateInteractor>();
|
||||
_getEmailChangesToPushNotificationInteractor = Get.find<GetEmailChangesToPushNotificationInteractor>();
|
||||
_storeEmailStateToRefreshInteractor = Get.find<StoreEmailStateToRefreshInteractor>();
|
||||
_dashBoardController = getBinding<MailboxDashBoardController>();
|
||||
_getStoredEmailStateInteractor = getBinding<GetStoredEmailStateInteractor>();
|
||||
_getStoredEmailDeliveryStateInteractor = getBinding<GetStoredEmailDeliveryStateInteractor>();
|
||||
_storeEmailDeliveryStateInteractor = getBinding<StoreEmailDeliveryStateInteractor>();
|
||||
_getEmailChangesToPushNotificationInteractor = getBinding<GetEmailChangesToPushNotificationInteractor>();
|
||||
_storeEmailStateToRefreshInteractor = getBinding<StoreEmailStateToRefreshInteractor>();
|
||||
} catch (e) {
|
||||
logError('EmailChangeListener::_internal(): IS NOT REGISTERED: ${e.toString()}');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user