mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-25 06:41:01 +00:00
various bugfixes
This commit is contained in:
@@ -14,11 +14,12 @@ import kotlinx.coroutines.withTimeoutOrNull
|
||||
class SubscriptionHelper {
|
||||
companion object {
|
||||
private fun loadSelected(context: Context, mediaId: Int, isAdult: Boolean, isAnime: Boolean): Selected {
|
||||
val sharedPreferences = context.getSharedPreferences("Dantotsu", Context.MODE_PRIVATE)
|
||||
val data = loadData<Selected>("${mediaId}-select", context) ?: Selected().let {
|
||||
it.sourceIndex =
|
||||
if (isAdult) 0
|
||||
else if (isAnime) {loadData("settings_def_anime_source_s_r", context) ?: 0}
|
||||
else loadData("settings_def_manga_source_s_r", context) ?: 0
|
||||
else if (isAnime) {sharedPreferences.getInt("settings_def_anime_source_s_r",0)}
|
||||
else {sharedPreferences.getInt("settings_def_manga_source_s_r",0)}
|
||||
it.preferDub = loadData("settings_prefer_dub", context) ?: false
|
||||
it
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user