diff --git a/lib/features/caching/caching_manager.dart b/lib/features/caching/caching_manager.dart index 6ab1e29bd..236183908 100644 --- a/lib/features/caching/caching_manager.dart +++ b/lib/features/caching/caching_manager.dart @@ -1,7 +1,6 @@ import 'package:flutter/foundation.dart'; import 'package:tmail_ui_user/features/caching/account_cache_client.dart'; import 'package:tmail_ui_user/features/caching/email_cache_client.dart'; -import 'package:tmail_ui_user/features/caching/fcm_token_cache_client.dart'; import 'package:tmail_ui_user/features/caching/mailbox_cache_client.dart'; import 'package:tmail_ui_user/features/caching/recent_search_cache_client.dart'; import 'package:tmail_ui_user/features/caching/state_cache_client.dart'; @@ -14,7 +13,6 @@ class CachingManager { final EmailCacheClient _emailCacheClient; final RecentSearchCacheClient _recentSearchCacheClient; final AccountCacheClient _accountCacheClient; - final FcmTokenCacheClient _fcmTokenCacheClient; final FCMCacheManager _fcmCacheManager; CachingManager( @@ -23,7 +21,6 @@ class CachingManager { this._emailCacheClient, this._recentSearchCacheClient, this._accountCacheClient, - this._fcmTokenCacheClient, this._fcmCacheManager, ); @@ -35,7 +32,6 @@ class CachingManager { _emailCacheClient.clearAllData(), _recentSearchCacheClient.clearAllData(), _accountCacheClient.clearAllData(), - _fcmTokenCacheClient.clearAllData(), _fcmCacheManager.clearAllStateToRefresh() ]); } else { @@ -45,7 +41,6 @@ class CachingManager { _emailCacheClient.deleteBox(), _recentSearchCacheClient.deleteBox(), _accountCacheClient.deleteBox(), - _fcmTokenCacheClient.deleteBox(), _fcmCacheManager.clearAllStateToRefresh() ]); } diff --git a/lib/features/caching/config/hive_cache_config.dart b/lib/features/caching/config/hive_cache_config.dart index 564dc4020..fa964c9c9 100644 --- a/lib/features/caching/config/hive_cache_config.dart +++ b/lib/features/caching/config/hive_cache_config.dart @@ -19,7 +19,6 @@ import 'package:tmail_ui_user/features/mailbox/data/model/mailbox_rights_cache.d import 'package:tmail_ui_user/features/mailbox/data/model/state_cache.dart'; import 'package:tmail_ui_user/features/mailbox/data/model/state_type.dart'; import 'package:tmail_ui_user/features/mailbox_dashboard/data/model/recent_search_cache.dart'; -import 'package:tmail_ui_user/features/push_notification/data/model/fcm_token_cache.dart'; import 'package:tmail_ui_user/features/thread/data/model/email_address_hive_cache.dart'; import 'package:tmail_ui_user/features/thread/data/model/email_cache.dart'; @@ -119,10 +118,6 @@ class HiveCacheConfig { RecentLoginUsernameCacheAdapter(), CachingConstants.RECENT_LOGIN_USERNAME_HIVE_CACHE_IDENTITY ); - registerCacheAdapter( - FCMTokenCacheAdapter(), - CachingConstants.FCM_TOKEN_CACHE_IDENTITY - ); } void registerCacheAdapter(TypeAdapter typeAdapter, int typeId) { diff --git a/lib/features/caching/fcm_token_cache_client.dart b/lib/features/caching/fcm_token_cache_client.dart deleted file mode 100644 index d0dbf486d..000000000 --- a/lib/features/caching/fcm_token_cache_client.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'package:tmail_ui_user/features/caching/config/hive_cache_client.dart'; -import 'package:tmail_ui_user/features/push_notification/data/model/fcm_token_cache.dart'; - -class FcmTokenCacheClient extends HiveCacheClient { - - @override - String get tableName => 'FCMTokenCache'; -} \ No newline at end of file diff --git a/lib/features/caching/utils/caching_constants.dart b/lib/features/caching/utils/caching_constants.dart index 0f9f61e1c..ed2f0008e 100644 --- a/lib/features/caching/utils/caching_constants.dart +++ b/lib/features/caching/utils/caching_constants.dart @@ -13,5 +13,4 @@ class CachingConstants { static const int AUTHENTICATION_INFO_HIVE_CACHE_IDENTIFY = 11; static const int RECENT_LOGIN_URL_HIVE_CACHE_IDENTITY = 12; static const int RECENT_LOGIN_USERNAME_HIVE_CACHE_IDENTITY = 13; - static const int FCM_TOKEN_CACHE_IDENTITY = 14; } \ No newline at end of file diff --git a/lib/features/push_notification/data/datasource/fcm_datasource.dart b/lib/features/push_notification/data/datasource/fcm_datasource.dart index 75ce9e909..0cc5370dc 100644 --- a/lib/features/push_notification/data/datasource/fcm_datasource.dart +++ b/lib/features/push_notification/data/datasource/fcm_datasource.dart @@ -1,17 +1,10 @@ import 'package:fcm/model/firebase_subscription.dart'; import 'package:fcm/model/type_name.dart'; -import 'package:model/fcm/fcm_token_dto.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; import 'package:tmail_ui_user/features/push_notification/domain/model/register_new_token_request.dart'; abstract class FCMDatasource { - Future getFCMToken(String accountId); - - Future setFCMToken(FCMTokenDto fcmToken); - - Future deleteFCMToken(String accountId); - Future storeStateToRefresh(TypeName typeName, jmap.State newState); Future getStateToRefresh(TypeName typeName); diff --git a/lib/features/push_notification/data/datasource_impl/fcm_datasource_impl.dart b/lib/features/push_notification/data/datasource_impl/fcm_datasource_impl.dart index b79b462d2..6ad8a1a14 100644 --- a/lib/features/push_notification/data/datasource_impl/fcm_datasource_impl.dart +++ b/lib/features/push_notification/data/datasource_impl/fcm_datasource_impl.dart @@ -1,7 +1,6 @@ import 'package:fcm/model/firebase_subscription.dart'; import 'package:fcm/model/type_name.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; -import 'package:model/fcm/fcm_token_dto.dart'; import 'package:tmail_ui_user/features/push_notification/data/datasource/fcm_datasource.dart'; import 'package:tmail_ui_user/features/push_notification/data/network/fcm_api.dart'; import 'package:tmail_ui_user/features/push_notification/domain/model/register_new_token_request.dart'; @@ -23,31 +22,16 @@ class FcmDatasourceImpl extends FCMDatasource { }); } - @override - Future deleteFCMToken(String accountId) { - throw UnimplementedError(); - } - @override Future deleteStateToRefresh(TypeName typeName) { throw UnimplementedError(); } - @override - Future getFCMToken(String accountId) { - throw UnimplementedError(); - } - @override Future getStateToRefresh(TypeName typeName) { throw UnimplementedError(); } - @override - Future setFCMToken(FCMTokenDto fcmToken) { - throw UnimplementedError(); - } - @override Future storeDeviceId(String deviceId) { throw UnimplementedError(); diff --git a/lib/features/push_notification/data/datasource_impl/hive_fcm_datasource_impl.dart b/lib/features/push_notification/data/datasource_impl/hive_fcm_datasource_impl.dart index dc2e03a94..60463226d 100644 --- a/lib/features/push_notification/data/datasource_impl/hive_fcm_datasource_impl.dart +++ b/lib/features/push_notification/data/datasource_impl/hive_fcm_datasource_impl.dart @@ -1,7 +1,6 @@ import 'package:fcm/model/firebase_subscription.dart'; import 'package:fcm/model/type_name.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; -import 'package:model/fcm/fcm_token_dto.dart'; import 'package:tmail_ui_user/features/push_notification/data/datasource/fcm_datasource.dart'; import 'package:tmail_ui_user/features/push_notification/data/local/fcm_cache_manager.dart'; import 'package:tmail_ui_user/features/push_notification/domain/model/register_new_token_request.dart'; @@ -14,33 +13,6 @@ class HiveFCMDatasourceImpl extends FCMDatasource { HiveFCMDatasourceImpl(this._firebaseCacheManager, this._exceptionThrower); - @override - Future getFCMToken(String accountId) { - return Future.sync(() async { - return await _firebaseCacheManager.getFCMToken(accountId); - }).catchError((error) { - _exceptionThrower.throwException(error); - }); - } - - @override - Future setFCMToken(FCMTokenDto fcmToken) { - return Future.sync(() async { - return await _firebaseCacheManager.setFCMToken(fcmToken); - }).catchError((error) { - _exceptionThrower.throwException(error); - }); - } - - @override - Future deleteFCMToken(String accountId) { - return Future.sync(() async { - return await _firebaseCacheManager.deleteFCMToken(accountId); - }).catchError((error) { - _exceptionThrower.throwException(error); - }); - } - @override Future storeStateToRefresh(TypeName typeName, jmap.State newState) { return Future.sync(() async { diff --git a/lib/features/push_notification/data/extensions/fcm_cache_extensions.dart b/lib/features/push_notification/data/extensions/fcm_cache_extensions.dart deleted file mode 100644 index 2e4302849..000000000 --- a/lib/features/push_notification/data/extensions/fcm_cache_extensions.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:model/fcm/fcm_token_dto.dart'; -import 'package:tmail_ui_user/features/push_notification/data/model/fcm_token_cache.dart'; - -extension FCMCacheExtension on FCMTokenCache { - FCMTokenDto toFCMDto() { - return FCMTokenDto( - token, - accountId, - ); - } -} diff --git a/lib/features/push_notification/data/extensions/fcm_extensions.dart b/lib/features/push_notification/data/extensions/fcm_extensions.dart deleted file mode 100644 index 08e477c15..000000000 --- a/lib/features/push_notification/data/extensions/fcm_extensions.dart +++ /dev/null @@ -1,11 +0,0 @@ -import 'package:model/fcm/fcm_token_dto.dart'; -import 'package:tmail_ui_user/features/push_notification/data/model/fcm_token_cache.dart'; - -extension FCMExtensions on FCMTokenDto { - FCMTokenCache toCache() { - return FCMTokenCache( - token, - accountId, - ); - } -} diff --git a/lib/features/push_notification/data/local/fcm_cache_manager.dart b/lib/features/push_notification/data/local/fcm_cache_manager.dart index 681407f7e..0f7cbc9ed 100644 --- a/lib/features/push_notification/data/local/fcm_cache_manager.dart +++ b/lib/features/push_notification/data/local/fcm_cache_manager.dart @@ -1,44 +1,15 @@ import 'package:core/utils/app_logger.dart'; import 'package:fcm/model/type_name.dart'; -import 'package:model/fcm/fcm_token_dto.dart'; import 'package:shared_preferences/shared_preferences.dart'; -import 'package:tmail_ui_user/features/caching/fcm_token_cache_client.dart'; -import 'package:tmail_ui_user/features/push_notification/data/extensions/fcm_cache_extensions.dart'; -import 'package:tmail_ui_user/features/push_notification/data/extensions/fcm_extensions.dart'; import 'package:tmail_ui_user/features/push_notification/domain/exceptions/fcm_exception.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; class FCMCacheManager { - final FcmTokenCacheClient _fcmTokenCacheClient; final SharedPreferences _sharedPreferences; static const String fcmDeviceIdKey = 'FCM_DEVICE_ID'; - FCMCacheManager(this._fcmTokenCacheClient, this._sharedPreferences); - - Future getFCMToken(String accountId) async { - try { - final firebase = await _fcmTokenCacheClient.getItem(accountId); - if(firebase != null ) { - return firebase.toFCMDto(); - } else { - throw NotFoundStoredFCMException(); - } - } catch (e) { - logError('FCMCacheManager::getFCM(): $e'); - throw NotFoundStoredFCMException(); - } - } - - Future setFCMToken(FCMTokenDto firebaseDto) { - log('FCMCacheManager::setFCM(): $_fcmTokenCacheClient'); - return _fcmTokenCacheClient.insertItem(firebaseDto.accountId, firebaseDto.toCache()); - } - - Future deleteFCMToken(String accountId) { - log('FCMCacheManager::deleteSelectedFCM(): $accountId'); - return _fcmTokenCacheClient.deleteItem(accountId); - } + FCMCacheManager(this._sharedPreferences); Future storeStateToRefresh(TypeName typeName, jmap.State newState) { return _sharedPreferences.setString(typeName.value, newState.value); diff --git a/lib/features/push_notification/data/model/fcm_token_cache.dart b/lib/features/push_notification/data/model/fcm_token_cache.dart deleted file mode 100644 index 47f755cc3..000000000 --- a/lib/features/push_notification/data/model/fcm_token_cache.dart +++ /dev/null @@ -1,22 +0,0 @@ -import 'package:equatable/equatable.dart'; -import 'package:hive/hive.dart'; -import 'package:tmail_ui_user/features/caching/utils/caching_constants.dart'; - -part 'fcm_token_cache.g.dart'; - -@HiveType(typeId: CachingConstants.FCM_TOKEN_CACHE_IDENTITY) -class FCMTokenCache extends HiveObject with EquatableMixin { - @HiveField(0) - final String token; - - @HiveField(1) - final String accountId; - - FCMTokenCache( - this.token, - this.accountId, - ); - - @override - List get props => [token, accountId]; -} diff --git a/lib/features/push_notification/data/repository/fcm_repository_impl.dart b/lib/features/push_notification/data/repository/fcm_repository_impl.dart index a871450f7..e6e10f881 100644 --- a/lib/features/push_notification/data/repository/fcm_repository_impl.dart +++ b/lib/features/push_notification/data/repository/fcm_repository_impl.dart @@ -3,7 +3,6 @@ import 'package:fcm/model/firebase_subscription.dart'; import 'package:fcm/model/type_name.dart'; import 'package:jmap_dart_client/jmap/account_id.dart'; import 'package:jmap_dart_client/jmap/core/properties/properties.dart'; -import 'package:model/fcm/fcm_token_dto.dart'; import 'package:tmail_ui_user/features/push_notification/data/datasource/fcm_datasource.dart'; import 'package:tmail_ui_user/features/push_notification/domain/model/register_new_token_request.dart'; import 'package:tmail_ui_user/features/push_notification/domain/repository/fcm_repository.dart'; @@ -22,21 +21,6 @@ class FCMRepositoryImpl extends FCMRepository { this._threadDataSource ); - @override - Future getFCMToken(String accountId) { - return _fcmDatasource[DataSourceType.local]!.getFCMToken(accountId); - } - - @override - Future setFCMToken(FCMTokenDto fcmTokenDto) { - return _fcmDatasource[DataSourceType.local]!.setFCMToken(fcmTokenDto); - } - - @override - Future deleteFCMToken(String accountId) { - return _fcmDatasource[DataSourceType.local]!.deleteFCMToken(accountId); - } - @override Future getEmailChangesToPushNotification( AccountId accountId, diff --git a/lib/features/push_notification/domain/exceptions/fcm_exception.dart b/lib/features/push_notification/domain/exceptions/fcm_exception.dart index 756aa19c1..6edfdbd7d 100644 --- a/lib/features/push_notification/domain/exceptions/fcm_exception.dart +++ b/lib/features/push_notification/domain/exceptions/fcm_exception.dart @@ -1,5 +1,3 @@ -class NotFoundStoredFCMException implements Exception {} - class NotSupportFCMException implements Exception {} class NotFoundStateToRefreshException implements Exception {} diff --git a/lib/features/push_notification/domain/repository/fcm_repository.dart b/lib/features/push_notification/domain/repository/fcm_repository.dart index b1b019074..8aaa26bdf 100644 --- a/lib/features/push_notification/domain/repository/fcm_repository.dart +++ b/lib/features/push_notification/domain/repository/fcm_repository.dart @@ -2,18 +2,11 @@ import 'package:fcm/model/firebase_subscription.dart'; import 'package:fcm/model/type_name.dart'; import 'package:jmap_dart_client/jmap/account_id.dart'; import 'package:jmap_dart_client/jmap/core/properties/properties.dart'; -import 'package:model/fcm/fcm_token_dto.dart'; import 'package:tmail_ui_user/features/push_notification/domain/model/register_new_token_request.dart'; import 'package:tmail_ui_user/features/thread/domain/model/email_response.dart'; import 'package:jmap_dart_client/jmap/core/state.dart' as jmap; abstract class FCMRepository { - Future getFCMToken(String accountId); - - Future setFCMToken(FCMTokenDto fcmTokenDto); - - Future deleteFCMToken(String accountId); - Future getEmailChangesToPushNotification( AccountId accountId, jmap.State currentState, diff --git a/lib/features/push_notification/domain/state/delete_fcm_token_state.dart b/lib/features/push_notification/domain/state/delete_fcm_token_state.dart deleted file mode 100644 index f5bc3b78c..000000000 --- a/lib/features/push_notification/domain/state/delete_fcm_token_state.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:core/core.dart'; - -class DeleteFCMTokenSuccess extends UIState { - - - DeleteFCMTokenSuccess(); - - @override - List get props => []; -} - -class DeleteFCMTokenFailure extends FeatureFailure { - final dynamic exception; - - DeleteFCMTokenFailure(this.exception); - - @override - List get props => [exception]; -} \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/get_fcm_token_state.dart b/lib/features/push_notification/domain/state/get_fcm_token_state.dart deleted file mode 100644 index e17d2ebbf..000000000 --- a/lib/features/push_notification/domain/state/get_fcm_token_state.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:core/core.dart'; -import 'package:model/fcm/fcm_token_dto.dart'; - -class GetFCMTokenSuccess extends UIState { - - final FCMTokenDto firebaseDto; - - GetFCMTokenSuccess(this.firebaseDto); - - @override - List get props => [firebaseDto]; -} - -class GetFCMTokenFailure extends FeatureFailure { - final dynamic exception; - - GetFCMTokenFailure(this.exception); - - @override - List get props => [exception]; -} \ No newline at end of file diff --git a/lib/features/push_notification/domain/state/save_fcm_token_state.dart b/lib/features/push_notification/domain/state/save_fcm_token_state.dart deleted file mode 100644 index 84ece486b..000000000 --- a/lib/features/push_notification/domain/state/save_fcm_token_state.dart +++ /dev/null @@ -1,19 +0,0 @@ -import 'package:core/core.dart'; - -class SaveFCMTokenSuccess extends UIState { - - - SaveFCMTokenSuccess(); - - @override - List get props => []; -} - -class SaveFCMTokenFailure extends FeatureFailure { - final dynamic exception; - - SaveFCMTokenFailure(this.exception); - - @override - List get props => [exception]; -} \ No newline at end of file diff --git a/lib/features/push_notification/domain/usecases/delete_fcm_token_cache_interactor.dart b/lib/features/push_notification/domain/usecases/delete_fcm_token_cache_interactor.dart deleted file mode 100644 index ef0bdd94e..000000000 --- a/lib/features/push_notification/domain/usecases/delete_fcm_token_cache_interactor.dart +++ /dev/null @@ -1,20 +0,0 @@ -import 'package:core/core.dart'; -import 'package:dartz/dartz.dart'; -import 'package:tmail_ui_user/features/push_notification/domain/repository/fcm_repository.dart'; -import 'package:tmail_ui_user/features/push_notification/domain/state/delete_fcm_token_state.dart'; - -class DeleteFCMTokenCacheInteractor { - final FCMRepository _fcmRepository; - - DeleteFCMTokenCacheInteractor(this._fcmRepository); - - Stream> execute(String accountId) async* { - try { - await _fcmRepository.deleteFCMToken(accountId); - yield Right(DeleteFCMTokenSuccess()); - } catch (e) { - logError('DeleteFirebaseCacheInteractor::execute(): $e'); - yield Left(DeleteFCMTokenFailure(e)); - } - } -} diff --git a/lib/features/push_notification/domain/usecases/get_fcm_token_cache_interactor.dart b/lib/features/push_notification/domain/usecases/get_fcm_token_cache_interactor.dart deleted file mode 100644 index 408a69802..000000000 --- a/lib/features/push_notification/domain/usecases/get_fcm_token_cache_interactor.dart +++ /dev/null @@ -1,23 +0,0 @@ - -import 'package:core/core.dart'; -import 'package:dartz/dartz.dart'; -import 'package:tmail_ui_user/features/push_notification/domain/repository/fcm_repository.dart'; -import 'package:tmail_ui_user/features/push_notification/domain/state/get_fcm_token_state.dart'; - -class GetFCMTokenCacheInteractor { - - final FCMRepository _fcmRepository; - - GetFCMTokenCacheInteractor(this._fcmRepository); - - Stream> execute( - String accountId) async* { - try { - final fcmToken = await _fcmRepository.getFCMToken(accountId); - yield Right(GetFCMTokenSuccess(fcmToken)); - } catch (e) { - logError('GetFirebaseCacheInteractor::execute(): $e'); - yield Left(GetFCMTokenFailure(e)); - } - } -} \ No newline at end of file diff --git a/lib/features/push_notification/domain/usecases/save_fcm_token_cache_interactor.dart b/lib/features/push_notification/domain/usecases/save_fcm_token_cache_interactor.dart deleted file mode 100644 index bbcfd91db..000000000 --- a/lib/features/push_notification/domain/usecases/save_fcm_token_cache_interactor.dart +++ /dev/null @@ -1,21 +0,0 @@ -import 'package:core/core.dart'; -import 'package:dartz/dartz.dart'; -import 'package:model/fcm/fcm_token_dto.dart'; -import 'package:tmail_ui_user/features/push_notification/domain/repository/fcm_repository.dart'; -import 'package:tmail_ui_user/features/push_notification/domain/state/save_fcm_token_state.dart'; - -class SaveFCMTokenCacheInteractor { - final FCMRepository _fcmRepository; - - SaveFCMTokenCacheInteractor(this._fcmRepository); - - Stream> execute(FCMTokenDto fcmTokenDto) async* { - try { - await _fcmRepository.setFCMToken(fcmTokenDto); - yield Right(SaveFCMTokenSuccess()); - } catch (e) { - logError('SaveFirebaseCacheInteractor::execute(): $e'); - yield Left(SaveFCMTokenFailure(e)); - } - } -} 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 48f56bdba..d58b612db 100644 --- a/lib/features/push_notification/presentation/bindings/fcm_interactor_bindings.dart +++ b/lib/features/push_notification/presentation/bindings/fcm_interactor_bindings.dart @@ -9,15 +9,12 @@ import 'package:tmail_ui_user/features/push_notification/data/network/fcm_api.da import 'package:tmail_ui_user/features/push_notification/data/repository/fcm_repository_impl.dart'; import 'package:tmail_ui_user/features/push_notification/domain/repository/fcm_repository.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/delete_email_state_to_refresh_interactor.dart'; -import 'package:tmail_ui_user/features/push_notification/domain/usecases/delete_fcm_token_cache_interactor.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/get_device_id_interactor.dart'; 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_fcm_token_cache_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_stored_email_delivery_state_interactor.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/register_new_token_interactor.dart'; -import 'package:tmail_ui_user/features/push_notification/domain/usecases/save_fcm_token_cache_interactor.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/store_device_id_interactor.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/store_email_delivery_state_interactor.dart'; import 'package:tmail_ui_user/features/push_notification/domain/usecases/store_email_state_to_refresh_interactor.dart'; @@ -55,9 +52,6 @@ class FcmInteractorBindings extends InteractorsBindings { @override void bindingsInteractor() { - Get.lazyPut(() => DeleteFCMTokenCacheInteractor(Get.find())); - Get.lazyPut(() => SaveFCMTokenCacheInteractor(Get.find())); - Get.lazyPut(() => GetFCMTokenCacheInteractor(Get.find())); Get.lazyPut(() => GetStoredEmailDeliveryStateInteractor(Get.find())); Get.lazyPut(() => StoreEmailDeliveryStateInteractor(Get.find())); Get.lazyPut(() => GetEmailChangesToPushNotificationInteractor(Get.find())); diff --git a/lib/main/bindings/local/local_bindings.dart b/lib/main/bindings/local/local_bindings.dart index 6e92a905a..42e3fe64f 100644 --- a/lib/main/bindings/local/local_bindings.dart +++ b/lib/main/bindings/local/local_bindings.dart @@ -6,7 +6,6 @@ import 'package:tmail_ui_user/features/caching/authentication_info_cache_client. import 'package:tmail_ui_user/features/caching/caching_manager.dart'; import 'package:tmail_ui_user/features/caching/email_cache_client.dart'; import 'package:tmail_ui_user/features/caching/encryption_key_cache_client.dart'; -import 'package:tmail_ui_user/features/caching/fcm_token_cache_client.dart'; import 'package:tmail_ui_user/features/caching/mailbox_cache_client.dart'; import 'package:tmail_ui_user/features/caching/recent_login_url_cache_client.dart'; import 'package:tmail_ui_user/features/caching/recent_login_username_cache_client.dart'; @@ -57,15 +56,13 @@ class LocalBindings extends Bindings { Get.put(RecentLoginUrlCacheManager((Get.find()))); Get.put(RecentLoginUsernameCacheClient()); Get.put(RecentLoginUsernameCacheManager(Get.find())); - Get.put(FcmTokenCacheClient()); - Get.put(FCMCacheManager(Get.find(), Get.find())); + Get.put(FCMCacheManager(Get.find())); Get.put(CachingManager( Get.find(), Get.find(), Get.find(), Get.find(), Get.find(), - Get.find(), Get.find() )); }