aboutsummaryrefslogtreecommitdiff
path: root/sample/src/main/kotlin
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-04-17 15:32:32 -0700
committerGitHub <noreply@github.com>2021-04-17 15:32:32 -0700
commit12f4725a90762aeeca8936b6449445e800b2f09a (patch)
tree584d1347abf542361c327519942080c75c16a889 /sample/src/main/kotlin
parent3ec75195a25f6e502ceca7a89aa66f6313e263e6 (diff)
parent1057b6a113c7b2fa1320ce0378e34484f901ee2f (diff)
downloadkau-12f4725a90762aeeca8936b6449445e800b2f09a.tar.gz
kau-12f4725a90762aeeca8936b6449445e800b2f09a.tar.bz2
kau-12f4725a90762aeeca8936b6449445e800b2f09a.zip
Merge pull request #261 from AllanWang/versions
Diffstat (limited to 'sample/src/main/kotlin')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt6
1 files changed, 3 insertions, 3 deletions
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt
index ee39184..970d3eb 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt
@@ -23,8 +23,8 @@ import ca.allanwang.kau.kpref.KPrefFactoryAndroid
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
-import dagger.hilt.android.components.ApplicationComponent
import dagger.hilt.android.qualifiers.ApplicationContext
+import dagger.hilt.components.SingletonComponent
/**
* Created by Allan Wang on 2017-06-07.
@@ -44,14 +44,14 @@ class KPrefSample(factory: KPrefFactory) : KPref("pref_sample", factory = factor
}
@Module
-@InstallIn(ApplicationComponent::class)
+@InstallIn(SingletonComponent::class)
object PrefModule {
@Provides
fun pref(factory: KPrefFactory): KPrefSample = KPrefSample(factory)
}
@Module
-@InstallIn(ApplicationComponent::class)
+@InstallIn(SingletonComponent::class)
object PrefFactoryModule {
@Provides
fun factory(@ApplicationContext context: Context): KPrefFactory = KPrefFactoryAndroid(context)