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); }