imported more settings

This commit is contained in:
aayush262 2024-01-30 17:34:01 +05:30
parent 922ccdfb27
commit c242fedfee
21 changed files with 90 additions and 52 deletions

View file

@ -16,6 +16,8 @@ import ani.dantotsu.parsers.MangaChapter
import ani.dantotsu.parsers.MangaParser
import ani.dantotsu.parsers.MangaSources
import ani.dantotsu.saveData
import ani.dantotsu.settings.saving.PrefName
import ani.dantotsu.settings.saving.PrefWrapper
import ani.dantotsu.tryWithSuspend
import kotlinx.coroutines.withTimeoutOrNull
@ -29,7 +31,7 @@ class SubscriptionHelper {
): Selected {
val data = loadData<Selected>("${mediaId}-select", context) ?: Selected().let {
it.sourceIndex = 0
it.preferDub = loadData("settings_prefer_dub", context) ?: false
it.preferDub = PrefWrapper.getVal(PrefName.SettingsPreferDub, false)
it
}
return data