TF-2680 Bind dependencies
This commit is contained in:
+15
-1
@@ -95,6 +95,11 @@ import 'package:tmail_ui_user/features/sending_queue/domain/usecases/store_sendi
|
||||
import 'package:tmail_ui_user/features/sending_queue/domain/usecases/update_sending_email_interactor.dart';
|
||||
import 'package:tmail_ui_user/features/sending_queue/presentation/bindings/sending_queue_bindings.dart';
|
||||
import 'package:tmail_ui_user/features/sending_queue/presentation/bindings/sending_queue_interactor_bindings.dart';
|
||||
import 'package:tmail_ui_user/features/server_settings/data/datasource/server_settings_data_source.dart';
|
||||
import 'package:tmail_ui_user/features/server_settings/data/datasource_impl/remote_server_settings_data_source_impl.dart';
|
||||
import 'package:tmail_ui_user/features/server_settings/data/network/server_settings_api.dart';
|
||||
import 'package:tmail_ui_user/features/server_settings/data/repository/server_settings_repository_impl.dart';
|
||||
import 'package:tmail_ui_user/features/server_settings/domain/repository/server_settings_repository.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/datasource/thread_datasource.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/datasource_impl/local_thread_datasource_impl.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/datasource_impl/thread_datasource_impl.dart';
|
||||
@@ -188,6 +193,8 @@ class MailboxDashBoardBindings extends BaseBindings {
|
||||
Get.lazyPut<SpamReportDataSource>(() => Get.find<SpamReportDataSourceImpl>());
|
||||
Get.lazyPut<MailboxDataSource>(() => Get.find<MailboxDataSourceImpl>());
|
||||
Get.lazyPut<MailboxCacheDataSourceImpl>(() => Get.find<MailboxCacheDataSourceImpl>());
|
||||
Get.lazyPut<ServerSettingsDataSource>(
|
||||
() => Get.find<RemoteServerSettingsDataSourceImpl>());
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -245,6 +252,10 @@ class MailboxDashBoardBindings extends BaseBindings {
|
||||
Get.find<SendingEmailCacheManager>(),
|
||||
Get.find<FileUtils>(),
|
||||
Get.find<CacheExceptionThrower>()));
|
||||
Get.lazyPut(() => RemoteServerSettingsDataSourceImpl(
|
||||
Get.find<ServerSettingsAPI>(),
|
||||
Get.find<RemoteExceptionThrower>()
|
||||
));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -313,7 +324,8 @@ class MailboxDashBoardBindings extends BaseBindings {
|
||||
Get.lazyPut(() => GetSpamMailboxCachedInteractor(Get.find<SpamReportRepository>()));
|
||||
Get.lazyPut(() => SendEmailInteractor(
|
||||
Get.find<EmailRepository>(),
|
||||
Get.find<MailboxRepository>()
|
||||
Get.find<MailboxRepository>(),
|
||||
Get.find<ServerSettingsRepository>()
|
||||
));
|
||||
SendingQueueInteractorBindings().dependencies();
|
||||
Get.lazyPut(() => StoreSessionInteractor(Get.find<SessionRepository>()));
|
||||
@@ -346,6 +358,7 @@ class MailboxDashBoardBindings extends BaseBindings {
|
||||
Get.lazyPut<ComposerCacheRepository>(() => Get.find<ComposerCacheRepositoryImpl>());
|
||||
Get.lazyPut<SpamReportRepository>(() => Get.find<SpamReportRepositoryImpl>());
|
||||
Get.lazyPut<MailboxRepository>(() => Get.find<MailboxRepositoryImpl>());
|
||||
Get.lazyPut<ServerSettingsRepository>(() => Get.find<ServerSettingsRepositoryImpl>());
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -389,5 +402,6 @@ class MailboxDashBoardBindings extends BaseBindings {
|
||||
},
|
||||
Get.find<StateDataSource>(),
|
||||
));
|
||||
Get.lazyPut(() => ServerSettingsRepositoryImpl(Get.find<ServerSettingsDataSource>()));
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,11 @@ import 'package:tmail_ui_user/features/offline_mode/manager/new_email_cache_work
|
||||
import 'package:tmail_ui_user/features/offline_mode/manager/opened_email_cache_manager.dart';
|
||||
import 'package:tmail_ui_user/features/offline_mode/manager/opened_email_cache_worker_queue.dart';
|
||||
import 'package:tmail_ui_user/features/offline_mode/manager/sending_email_cache_manager.dart';
|
||||
import 'package:tmail_ui_user/features/server_settings/data/datasource/server_settings_data_source.dart';
|
||||
import 'package:tmail_ui_user/features/server_settings/data/datasource_impl/remote_server_settings_data_source_impl.dart';
|
||||
import 'package:tmail_ui_user/features/server_settings/data/network/server_settings_api.dart';
|
||||
import 'package:tmail_ui_user/features/server_settings/data/repository/server_settings_repository_impl.dart';
|
||||
import 'package:tmail_ui_user/features/server_settings/domain/repository/server_settings_repository.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/local/email_cache_manager.dart';
|
||||
import 'package:tmail_ui_user/main/exceptions/cache_exception_thrower.dart';
|
||||
import 'package:tmail_ui_user/main/exceptions/remote_exception_thrower.dart';
|
||||
@@ -46,6 +51,7 @@ class SendEmailInteractorBindings extends InteractorsBindings {
|
||||
Get.lazyPut<HtmlDataSource>(() => Get.find<HtmlDataSourceImpl>());
|
||||
Get.lazyPut<StateDataSource>(() => Get.find<StateDataSourceImpl>());
|
||||
Get.lazyPut<PrintFileDataSource>(() => Get.find<PrintFileDataSourceImpl>());
|
||||
Get.lazyPut<ServerSettingsDataSource>(() => Get.find<RemoteServerSettingsDataSourceImpl>());
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -82,17 +88,24 @@ class SendEmailInteractorBindings extends InteractorsBindings {
|
||||
Get.find<SendingEmailCacheManager>(),
|
||||
Get.find<FileUtils>(),
|
||||
Get.find<CacheExceptionThrower>()));
|
||||
Get.lazyPut(() => RemoteServerSettingsDataSourceImpl(
|
||||
Get.find<ServerSettingsAPI>(),
|
||||
Get.find<RemoteExceptionThrower>()));
|
||||
}
|
||||
|
||||
@override
|
||||
void bindingsInteractor() {
|
||||
Get.lazyPut(() => SendEmailInteractor(Get.find<EmailRepository>(), Get.find<MailboxRepository>()));
|
||||
Get.lazyPut(() => SendEmailInteractor(
|
||||
Get.find<EmailRepository>(),
|
||||
Get.find<MailboxRepository>(),
|
||||
Get.find<ServerSettingsRepository>()));
|
||||
}
|
||||
|
||||
@override
|
||||
void bindingsRepository() {
|
||||
Get.lazyPut<EmailRepository>(() => Get.find<EmailRepositoryImpl>());
|
||||
Get.lazyPut<MailboxRepository>(() => Get.find<MailboxRepositoryImpl>());
|
||||
Get.lazyPut<ServerSettingsRepository>(() => Get.find<ServerSettingsRepositoryImpl>());
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -113,6 +126,8 @@ class SendEmailInteractorBindings extends InteractorsBindings {
|
||||
},
|
||||
Get.find<StateDataSource>(),
|
||||
));
|
||||
Get.lazyPut(() => ServerSettingsRepositoryImpl(
|
||||
Get.find<ServerSettingsDataSource>()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -31,6 +31,7 @@ import 'package:tmail_ui_user/features/manage_account/data/network/vacation_api.
|
||||
import 'package:tmail_ui_user/features/push_notification/data/keychain/keychain_sharing_manager.dart';
|
||||
import 'package:tmail_ui_user/features/push_notification/data/network/fcm_api.dart';
|
||||
import 'package:tmail_ui_user/features/quotas/data/network/quotas_api.dart';
|
||||
import 'package:tmail_ui_user/features/server_settings/data/network/server_settings_api.dart';
|
||||
import 'package:tmail_ui_user/features/thread/data/network/thread_api.dart';
|
||||
import 'package:tmail_ui_user/main/exceptions/remote_exception_thrower.dart';
|
||||
import 'package:tmail_ui_user/main/exceptions/send_email_exception_thrower.dart';
|
||||
@@ -119,6 +120,7 @@ class NetworkBindings extends Bindings {
|
||||
Get.put(QuotasAPI(Get.find<HttpClient>()));
|
||||
Get.put(FcmApi(Get.find<HttpClient>()));
|
||||
Get.put(SpamReportApi(Get.find<HttpClient>()));
|
||||
Get.put(ServerSettingsAPI(Get.find<HttpClient>()));
|
||||
}
|
||||
|
||||
void _bindingConnection() {
|
||||
|
||||
Reference in New Issue
Block a user