Split download preferences from PreferencesHelper (#8048)

This commit is contained in:
Andreas
2022-09-21 23:45:07 +02:00
committed by GitHub
parent ec34977a64
commit e82963c9ef
17 changed files with 149 additions and 91 deletions
@@ -13,11 +13,13 @@ import eu.kanade.data.AndroidDatabaseHandler
import eu.kanade.data.DatabaseHandler
import eu.kanade.data.dateAdapter
import eu.kanade.data.listOfStringsAdapter
import eu.kanade.domain.download.service.DownloadPreferences
import eu.kanade.domain.library.service.LibraryPreferences
import eu.kanade.domain.source.service.SourcePreferences
import eu.kanade.domain.track.service.TrackPreferences
import eu.kanade.tachiyomi.core.preference.AndroidPreferenceStore
import eu.kanade.tachiyomi.core.preference.PreferenceStore
import eu.kanade.tachiyomi.core.provider.AndroidDownloadFolderProvider
import eu.kanade.tachiyomi.core.security.SecurityPreferences
import eu.kanade.tachiyomi.data.cache.ChapterCache
import eu.kanade.tachiyomi.data.cache.CoverCache
@@ -159,6 +161,15 @@ class PreferenceModule(val application: Application) : InjektModule {
addSingletonFactory {
TrackPreferences(get())
}
addSingletonFactory {
AndroidDownloadFolderProvider(application)
}
addSingletonFactory {
DownloadPreferences(
folderProvider = get<AndroidDownloadFolderProvider>(),
preferenceStore = get(),
)
}
addSingletonFactory {
PreferencesHelper(
context = application,