TF-2078 Implement get calendar event action in domain & data layer
(cherry picked from commit 6c372d57cfebf31e776f071b514e71c637b44257)
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
import 'package:core/data/model/source_type/data_source_type.dart';
|
||||
import 'package:get/get.dart';
|
||||
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';
|
||||
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 {
|
||||
@@ -22,6 +26,9 @@ class CalendarEventInteractorBindings extends InteractorsBindings {
|
||||
Get.lazyPut(() => CalendarEventDataSourceImpl(
|
||||
Get.find<CalendarEventAPI>(),
|
||||
Get.find<RemoteExceptionThrower>()));
|
||||
Get.lazyPut(() => LocalCalendarEventDataSourceImpl(
|
||||
Get.find<HtmlAnalyzer>(),
|
||||
Get.find<CacheExceptionThrower>()));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -36,6 +43,11 @@ class CalendarEventInteractorBindings extends InteractorsBindings {
|
||||
|
||||
@override
|
||||
void bindingsRepositoryImpl() {
|
||||
Get.lazyPut(() => CalendarEventRepositoryImpl(Get.find<CalendarEventDataSource>()));
|
||||
Get.lazyPut(() => CalendarEventRepositoryImpl(
|
||||
{
|
||||
DataSourceType.network: Get.find<CalendarEventDataSource>(),
|
||||
DataSourceType.local: Get.find<LocalCalendarEventDataSourceImpl>(),
|
||||
}
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user