Initial commit
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
</manifest>
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package ru.tanexc.hemoanalysis.core.database
|
||||
|
||||
import android.content.Context
|
||||
import com.russhwolf.settings.Settings
|
||||
import com.russhwolf.settings.SharedPreferencesSettings
|
||||
import org.koin.core.scope.Scope
|
||||
|
||||
internal actual fun Scope.createAnalysisParamsSettings(): Settings {
|
||||
return SharedPreferencesSettings(
|
||||
delegate = get<Context>().getSharedPreferences("analysis_params_settings", Context.MODE_PRIVATE)
|
||||
)
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package ru.tanexc.hemoanalysis.core.database
|
||||
|
||||
import android.content.Context
|
||||
import com.russhwolf.settings.Settings
|
||||
import com.russhwolf.settings.SharedPreferencesSettings
|
||||
import org.koin.core.scope.Scope
|
||||
|
||||
internal actual fun Scope.createModelInfoSettings(): Settings {
|
||||
return SharedPreferencesSettings(
|
||||
delegate = get<Context>().getSharedPreferences("model_info_settings", Context.MODE_PRIVATE)
|
||||
)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package ru.tanexc.hemoanalysis.core.database
|
||||
|
||||
import com.russhwolf.settings.Settings
|
||||
import org.koin.core.scope.Scope
|
||||
|
||||
internal expect fun Scope.createAnalysisParamsSettings(): Settings
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package ru.tanexc.hemoanalysis.core.database
|
||||
|
||||
import com.russhwolf.settings.Settings
|
||||
import org.koin.core.qualifier.StringQualifier
|
||||
import org.koin.dsl.module
|
||||
|
||||
val databaseModule = module {
|
||||
single<Settings>(qualifier = StringQualifier("AnalysisParamsSettings")) { createAnalysisParamsSettings() }
|
||||
single<Settings>(qualifier = StringQualifier("ModelInfoSettings")) { createModelInfoSettings() }
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package ru.tanexc.hemoanalysis.core.database
|
||||
|
||||
import com.russhwolf.settings.Settings
|
||||
import org.koin.core.scope.Scope
|
||||
|
||||
internal expect fun Scope.createModelInfoSettings(): Settings
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package ru.tanexc.hemoanalysis.core.database
|
||||
|
||||
import com.russhwolf.settings.NSUserDefaultsSettings
|
||||
import com.russhwolf.settings.Settings
|
||||
import org.koin.core.scope.Scope
|
||||
import platform.Foundation.NSUserDefaults
|
||||
|
||||
internal actual fun Scope.createAnalysisParamsSettings(): Settings {
|
||||
return NSUserDefaultsSettings(
|
||||
delegate = NSUserDefaults.standardUserDefaults
|
||||
)
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package ru.tanexc.hemoanalysis.core.database
|
||||
|
||||
import com.russhwolf.settings.NSUserDefaultsSettings
|
||||
import com.russhwolf.settings.Settings
|
||||
import org.koin.core.scope.Scope
|
||||
import platform.Foundation.NSUserDefaults
|
||||
|
||||
internal actual fun Scope.createModelInfoSettings(): Settings {
|
||||
return NSUserDefaultsSettings(
|
||||
delegate = NSUserDefaults.standardUserDefaults
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user