From 70104540d6b0510b2603045b64a646707874e0a9 Mon Sep 17 00:00:00 2001 From: Mustafa Ozhan Date: Fri, 23 Dec 2022 12:21:29 +0200 Subject: [PATCH] [Oztechan/CCC#1524] Remove NativeDependencyWrapper --- .../com/oztechan/ccc/client/di/NativeDependencyWrapper.kt | 5 ----- .../ccc/client/di/module/submodule/IOSSettingsModule.kt | 3 +-- .../kotlin/com/oztechan/ccc/provider/di/module/IOSModule.kt | 3 +-- 3 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 client/src/iosMain/kotlin/com/oztechan/ccc/client/di/NativeDependencyWrapper.kt diff --git a/client/src/iosMain/kotlin/com/oztechan/ccc/client/di/NativeDependencyWrapper.kt b/client/src/iosMain/kotlin/com/oztechan/ccc/client/di/NativeDependencyWrapper.kt deleted file mode 100644 index 1c2f79ac5e..0000000000 --- a/client/src/iosMain/kotlin/com/oztechan/ccc/client/di/NativeDependencyWrapper.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.oztechan.ccc.client.di - -import platform.Foundation.NSUserDefaults - -data class NativeDependencyWrapper(val userDefaults: NSUserDefaults) diff --git a/client/src/iosMain/kotlin/com/oztechan/ccc/client/di/module/submodule/IOSSettingsModule.kt b/client/src/iosMain/kotlin/com/oztechan/ccc/client/di/module/submodule/IOSSettingsModule.kt index 0f3e3baa5c..bf170b5899 100644 --- a/client/src/iosMain/kotlin/com/oztechan/ccc/client/di/module/submodule/IOSSettingsModule.kt +++ b/client/src/iosMain/kotlin/com/oztechan/ccc/client/di/module/submodule/IOSSettingsModule.kt @@ -1,12 +1,11 @@ package com.oztechan.ccc.client.di.module.submodule -import com.oztechan.ccc.client.di.NativeDependencyWrapper import com.russhwolf.settings.AppleSettings import com.russhwolf.settings.Settings import org.koin.dsl.module internal actual val settingsModule = module { single { - AppleSettings(get().userDefaults) + AppleSettings(get()) } } diff --git a/provider/src/iosMain/kotlin/com/oztechan/ccc/provider/di/module/IOSModule.kt b/provider/src/iosMain/kotlin/com/oztechan/ccc/provider/di/module/IOSModule.kt index 0577ed12a3..ddf6372cc1 100644 --- a/provider/src/iosMain/kotlin/com/oztechan/ccc/provider/di/module/IOSModule.kt +++ b/provider/src/iosMain/kotlin/com/oztechan/ccc/provider/di/module/IOSModule.kt @@ -1,9 +1,8 @@ package com.oztechan.ccc.provider.di.module -import com.oztechan.ccc.client.di.NativeDependencyWrapper import org.koin.dsl.module import platform.Foundation.NSUserDefaults internal fun getIOSModule(userDefaults: NSUserDefaults) = module { - single { NativeDependencyWrapper(userDefaults) } + single { userDefaults } }