From 00aa51e082bde34715f8b4ebde79cd0046321f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 11 Dec 2023 12:56:13 +0900 Subject: [PATCH] fix --- .../main/java/one/nem/lacerta/data/impl/SharedPrefImpl.java | 2 +- .../java/one/nem/lacerta/data/module/SharedPrefModule.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/data/src/main/java/one/nem/lacerta/data/impl/SharedPrefImpl.java b/data/src/main/java/one/nem/lacerta/data/impl/SharedPrefImpl.java index 89d1f731..56be82bb 100644 --- a/data/src/main/java/one/nem/lacerta/data/impl/SharedPrefImpl.java +++ b/data/src/main/java/one/nem/lacerta/data/impl/SharedPrefImpl.java @@ -12,7 +12,7 @@ import one.nem.lacerta.data.model.shared_pref.enums.SharedPrefType; public class SharedPrefImpl implements SharedPref{ - private Context applicationContext; + private final Context applicationContext; @Inject public SharedPrefImpl(@ApplicationContext Context applicationContext) { diff --git a/data/src/main/java/one/nem/lacerta/data/module/SharedPrefModule.java b/data/src/main/java/one/nem/lacerta/data/module/SharedPrefModule.java index f536fdf1..1bbb5e42 100644 --- a/data/src/main/java/one/nem/lacerta/data/module/SharedPrefModule.java +++ b/data/src/main/java/one/nem/lacerta/data/module/SharedPrefModule.java @@ -7,11 +7,13 @@ import dagger.Binds; import dagger.Module; import dagger.hilt.InstallIn; import dagger.hilt.components.SingletonComponent; +import one.nem.lacerta.data.impl.SharedPrefImpl; +import one.nem.lacerta.data.repository.SharedPref; @Module @InstallIn(SingletonComponent.class) abstract public class SharedPrefModule { @Binds - abstract SharedPreferences bindSharedPreferences(Context applicationContext); + public abstract SharedPref bindSharedPref(SharedPrefImpl sharedPrefImpl); }