TF-439 Delete all class not used

This commit is contained in:
dab246
2022-11-30 12:34:27 +07:00
committed by Dat H. Pham
parent 81278d13ba
commit d990426c8e
22 changed files with 2 additions and 302 deletions
@@ -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<Either<Failure, Success>> execute(String accountId) async* {
try {
await _fcmRepository.deleteFCMToken(accountId);
yield Right<Failure, Success>(DeleteFCMTokenSuccess());
} catch (e) {
logError('DeleteFirebaseCacheInteractor::execute(): $e');
yield Left<Failure, Success>(DeleteFCMTokenFailure(e));
}
}
}
@@ -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<Either<Failure, Success>> execute(
String accountId) async* {
try {
final fcmToken = await _fcmRepository.getFCMToken(accountId);
yield Right<Failure, Success>(GetFCMTokenSuccess(fcmToken));
} catch (e) {
logError('GetFirebaseCacheInteractor::execute(): $e');
yield Left<Failure, Success>(GetFCMTokenFailure(e));
}
}
}
@@ -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<Either<Failure, Success>> execute(FCMTokenDto fcmTokenDto) async* {
try {
await _fcmRepository.setFCMToken(fcmTokenDto);
yield Right<Failure, Success>(SaveFCMTokenSuccess());
} catch (e) {
logError('SaveFirebaseCacheInteractor::execute(): $e');
yield Left<Failure, Success>(SaveFCMTokenFailure(e));
}
}
}