From 6abaf596e4db5a36057f6a8acf31b72f57a12e18 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 17 Apr 2021 20:06:36 -0700 Subject: Remove koin dependency in production --- .../kotlin/com/pitchedapps/frost/prefs/Prefs.kt | 29 +--------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'app/src/main/kotlin/com/pitchedapps/frost/prefs') diff --git a/app/src/main/kotlin/com/pitchedapps/frost/prefs/Prefs.kt b/app/src/main/kotlin/com/pitchedapps/frost/prefs/Prefs.kt index b76b8ead..0cf97c56 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/prefs/Prefs.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/prefs/Prefs.kt @@ -37,8 +37,6 @@ import dagger.Provides import dagger.hilt.InstallIn import dagger.hilt.android.qualifiers.ApplicationContext import dagger.hilt.components.SingletonComponent -import org.koin.core.context.GlobalContext -import org.koin.dsl.module import javax.inject.Inject import javax.inject.Singleton @@ -57,32 +55,7 @@ interface Prefs : NotifPrefs, ThemePrefs, ShowcasePrefs, - PrefsBase { - companion object { - fun get(): Prefs = GlobalContext.get().get() - - fun module() = module { - single { BehaviourPrefsImpl(get(), get()) } - single { CorePrefsImpl(get(), get()) } - single { FeedPrefsImpl(get(), get()) } - single { NotifPrefsImpl(get(), get()) } - single { ThemePrefsImpl(get(), get()) } - single { ShowcasePrefsImpl(get()) } - single { - PrefsImpl( - behaviourPrefs = get(), - corePrefs = get(), - feedPrefs = get(), - notifPrefs = get(), - themePrefs = get(), - showcasePrefs = get() - ) - } - // Needed for migration - single { OldPrefs(factory = get()) } - } - } -} + PrefsBase class PrefsImpl @Inject internal constructor( private val behaviourPrefs: BehaviourPrefs, -- cgit v1.2.3