mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
refactor: Move TrackPreferences to PreferenceModule
This commit is contained in:
parent
9a0d5b38c0
commit
27e7708803
2 changed files with 5 additions and 12 deletions
|
@ -26,12 +26,6 @@ class AppModule(val app: Application) : InjektModule {
|
|||
override fun InjektRegistrar.registerInjectables() {
|
||||
addSingleton(app)
|
||||
|
||||
addSingletonFactory<PreferenceStore> {
|
||||
AndroidPreferenceStore(app)
|
||||
}
|
||||
|
||||
addSingletonFactory { TrackPreferences(get()) }
|
||||
|
||||
addSingletonFactory { DatabaseHelper(app) }
|
||||
|
||||
addSingletonFactory { ChapterCache(app) }
|
||||
|
|
|
@ -5,6 +5,7 @@ import dev.yokai.domain.source.SourcePreferences
|
|||
import eu.kanade.tachiyomi.core.preference.AndroidPreferenceStore
|
||||
import eu.kanade.tachiyomi.core.preference.PreferenceStore
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.data.track.TrackPreferences
|
||||
import uy.kohesive.injekt.api.InjektModule
|
||||
import uy.kohesive.injekt.api.InjektRegistrar
|
||||
import uy.kohesive.injekt.api.addSingletonFactory
|
||||
|
@ -12,13 +13,11 @@ import uy.kohesive.injekt.api.get
|
|||
|
||||
class PreferenceModule(val application: Application) : InjektModule {
|
||||
override fun InjektRegistrar.registerInjectables() {
|
||||
addSingletonFactory<PreferenceStore> {
|
||||
AndroidPreferenceStore(application)
|
||||
}
|
||||
addSingletonFactory<PreferenceStore> { AndroidPreferenceStore(application) }
|
||||
|
||||
addSingletonFactory {
|
||||
SourcePreferences(get())
|
||||
}
|
||||
addSingletonFactory { SourcePreferences(get()) }
|
||||
|
||||
addSingletonFactory { TrackPreferences(get()) }
|
||||
|
||||
addSingletonFactory {
|
||||
PreferencesHelper(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue