INNER CODE UNIT · Kotlin
PreferenceModule
nekomangaorg/Neko · app/src/main/java/eu/kanade/tachiyomi/AppModule.kt:299
class PreferenceModule(val application: Application) : InjektModule {
override fun InjektRegistrar.registerInjectables() {
addSingletonFactory<PreferenceStore> { AndroidPreferenceStore(application) }
addSingletonFactory { DownloadProvider(get()) }
addSingletonFactory { AndroidStorageFolderProvider(application) }
addSingletonFactory {
StoragePreferences(
context = application,
folderProvider = get<AndroidStorageFolderProvider>(),
preferenceStore = get(),
)
}
addSingletonFactory { SecurityPreferences(get()) }