diff --git a/lib/features/email/data/datasource/calendar_event_datasource.dart b/lib/features/email/data/datasource/calendar_event_datasource.dart index b5247cb4aa..8e12a76ecc 100644 --- a/lib/features/email/data/datasource/calendar_event_datasource.dart +++ b/lib/features/email/data/datasource/calendar_event_datasource.dart @@ -4,14 +4,11 @@ import 'package:jmap_dart_client/jmap/core/id.dart'; import 'package:jmap_dart_client/jmap/mail/calendar/reply/calendar_event_accept_response.dart'; import 'package:jmap_dart_client/jmap/mail/calendar/reply/calendar_event_maybe_response.dart'; import 'package:jmap_dart_client/jmap/mail/calendar/reply/calendar_event_reject_response.dart'; -import 'package:tmail_ui_user/features/email/domain/model/event_action.dart'; import 'package:tmail_ui_user/features/email/presentation/model/blob_calendar_event.dart'; abstract class CalendarEventDataSource { Future> parse(AccountId accountId, Set blobIds); - Future> getListEventAction(String emailContents); - Future acceptEventInvitation(AccountId accountId, Set blobIds); Future maybeEventInvitation(AccountId accountId, Set blobIds); diff --git a/lib/features/email/data/datasource_impl/calendar_event_datasource_impl.dart b/lib/features/email/data/datasource_impl/calendar_event_datasource_impl.dart index d303b68a93..de1c14e7dc 100644 --- a/lib/features/email/data/datasource_impl/calendar_event_datasource_impl.dart +++ b/lib/features/email/data/datasource_impl/calendar_event_datasource_impl.dart @@ -6,7 +6,6 @@ import 'package:jmap_dart_client/jmap/mail/calendar/reply/calendar_event_maybe_r import 'package:jmap_dart_client/jmap/mail/calendar/reply/calendar_event_reject_response.dart'; import 'package:tmail_ui_user/features/email/data/datasource/calendar_event_datasource.dart'; import 'package:tmail_ui_user/features/email/data/network/calendar_event_api.dart'; -import 'package:tmail_ui_user/features/email/domain/model/event_action.dart'; import 'package:tmail_ui_user/features/email/presentation/model/blob_calendar_event.dart'; import 'package:tmail_ui_user/main/exceptions/exception_thrower.dart'; @@ -23,11 +22,6 @@ class CalendarEventDataSourceImpl extends CalendarEventDataSource { return await _calendarEventAPI.parse(accountId, blobIds); }).catchError(_exceptionThrower.throwException); } - - @override - Future> getListEventAction(String emailContents) { - throw UnimplementedError(); - } @override Future acceptEventInvitation(AccountId accountId, Set blobIds) { diff --git a/lib/features/email/data/datasource_impl/local_calendar_event_datasource_impl.dart b/lib/features/email/data/datasource_impl/local_calendar_event_datasource_impl.dart deleted file mode 100644 index c82b6c8941..0000000000 --- a/lib/features/email/data/datasource_impl/local_calendar_event_datasource_impl.dart +++ /dev/null @@ -1,46 +0,0 @@ - -import 'package:jmap_dart_client/jmap/account_id.dart'; -import 'package:jmap_dart_client/jmap/core/id.dart'; -import 'package:jmap_dart_client/jmap/mail/calendar/reply/calendar_event_accept_response.dart'; -import 'package:jmap_dart_client/jmap/mail/calendar/reply/calendar_event_maybe_response.dart'; -import 'package:jmap_dart_client/jmap/mail/calendar/reply/calendar_event_reject_response.dart'; -import 'package:tmail_ui_user/features/email/data/datasource/calendar_event_datasource.dart'; -import 'package:tmail_ui_user/features/email/data/local/html_analyzer.dart'; -import 'package:tmail_ui_user/features/email/domain/model/event_action.dart'; -import 'package:tmail_ui_user/features/email/presentation/model/blob_calendar_event.dart'; -import 'package:tmail_ui_user/main/exceptions/exception_thrower.dart'; - -class LocalCalendarEventDataSourceImpl extends CalendarEventDataSource { - - final HtmlAnalyzer _htmlAnalyzer; - final ExceptionThrower _exceptionThrower; - - LocalCalendarEventDataSourceImpl(this._htmlAnalyzer, this._exceptionThrower); - - @override - Future> parse(AccountId accountId, Set blobIds) { - throw UnimplementedError(); - } - - @override - Future> getListEventAction(String emailContents) { - return Future.sync(() async { - return await _htmlAnalyzer.getListEventAction(emailContents); - }).catchError(_exceptionThrower.throwException); - } - - @override - Future acceptEventInvitation(AccountId accountId, Set blobIds) { - throw UnimplementedError(); - } - - @override - Future maybeEventInvitation(AccountId accountId, Set blobIds) { - throw UnimplementedError(); - } - - @override - Future rejectEventInvitation(AccountId accountId, Set blobIds) { - throw UnimplementedError(); - } -} \ No newline at end of file diff --git a/lib/features/email/presentation/bindings/calendar_event_interactor_bindings.dart b/lib/features/email/presentation/bindings/calendar_event_interactor_bindings.dart index 90271d7712..e4718ed820 100644 --- a/lib/features/email/presentation/bindings/calendar_event_interactor_bindings.dart +++ b/lib/features/email/presentation/bindings/calendar_event_interactor_bindings.dart @@ -4,8 +4,6 @@ import 'package:jmap_dart_client/http/http_client.dart'; import 'package:tmail_ui_user/features/base/interactors_bindings.dart'; import 'package:tmail_ui_user/features/email/data/datasource/calendar_event_datasource.dart'; import 'package:tmail_ui_user/features/email/data/datasource_impl/calendar_event_datasource_impl.dart'; -import 'package:tmail_ui_user/features/email/data/datasource_impl/local_calendar_event_datasource_impl.dart'; -import 'package:tmail_ui_user/features/email/data/local/html_analyzer.dart'; import 'package:tmail_ui_user/features/email/data/network/calendar_event_api.dart'; import 'package:tmail_ui_user/features/email/data/repository/calendar_event_repository_impl.dart'; import 'package:tmail_ui_user/features/email/domain/repository/calendar_event_repository.dart'; @@ -13,7 +11,6 @@ import 'package:tmail_ui_user/features/email/domain/usecases/calendar_event_acce import 'package:tmail_ui_user/features/email/domain/usecases/maybe_calendar_event_interactor.dart'; import 'package:tmail_ui_user/features/email/domain/usecases/calendar_event_reject_interactor.dart'; import 'package:tmail_ui_user/features/email/domain/usecases/parse_calendar_event_interactor.dart'; -import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart'; import 'package:tmail_ui_user/main/exceptions/remote_exception_thrower.dart'; class CalendarEventInteractorBindings extends InteractorsBindings { @@ -29,9 +26,6 @@ class CalendarEventInteractorBindings extends InteractorsBindings { Get.lazyPut(() => CalendarEventDataSourceImpl( Get.find(), Get.find())); - Get.lazyPut(() => LocalCalendarEventDataSourceImpl( - Get.find(), - Get.find())); } @override @@ -50,10 +44,7 @@ class CalendarEventInteractorBindings extends InteractorsBindings { @override void bindingsRepositoryImpl() { Get.lazyPut(() => CalendarEventRepositoryImpl( - { - DataSourceType.network: Get.find(), - DataSourceType.local: Get.find(), - } + {DataSourceType.network: Get.find()} )); } } \ No newline at end of file