From 9604b1602fc47b962ad7f5d3a2689be7070423ee Mon Sep 17 00:00:00 2001 From: Dieguitux Date: Thu, 26 Dec 2024 15:49:21 +0100 Subject: [PATCH] fix(di): add missing bindings for settings import and export use cases (#193) --- .../core/persistence/di/PersistenceModule.kt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/core/persistence/src/commonMain/kotlin/com/livefast/eattrash/raccoonforlemmy/core/persistence/di/PersistenceModule.kt b/core/persistence/src/commonMain/kotlin/com/livefast/eattrash/raccoonforlemmy/core/persistence/di/PersistenceModule.kt index 280fd7e96..5b65ca283 100644 --- a/core/persistence/src/commonMain/kotlin/com/livefast/eattrash/raccoonforlemmy/core/persistence/di/PersistenceModule.kt +++ b/core/persistence/src/commonMain/kotlin/com/livefast/eattrash/raccoonforlemmy/core/persistence/di/PersistenceModule.kt @@ -22,6 +22,10 @@ import com.livefast.eattrash.raccoonforlemmy.core.persistence.repository.Instanc import com.livefast.eattrash.raccoonforlemmy.core.persistence.repository.MultiCommunityRepository import com.livefast.eattrash.raccoonforlemmy.core.persistence.repository.SettingsRepository import com.livefast.eattrash.raccoonforlemmy.core.persistence.repository.StopWordRepository +import com.livefast.eattrash.raccoonforlemmy.core.persistence.usecase.DefaultExportSettingsUseCase +import com.livefast.eattrash.raccoonforlemmy.core.persistence.usecase.DefaultImportSettingsUseCase +import com.livefast.eattrash.raccoonforlemmy.core.persistence.usecase.ExportSettingsUseCase +import com.livefast.eattrash.raccoonforlemmy.core.persistence.usecase.ImportSettingsUseCase import org.kodein.di.DI import org.kodein.di.bind import org.kodein.di.instance @@ -108,4 +112,19 @@ val persistenceModule = ) } } + bind { + singleton { + DefaultImportSettingsUseCase( + settingsRepository = instance(), + accountRepository = instance(), + ) + } + } + bind { + singleton { + DefaultExportSettingsUseCase( + settingsRepository = instance(), + ) + } + } }