forked from recloudstream/cloudstream
fix #43 (again)
This commit is contained in:
parent
032ac325e5
commit
8ff2540f4b
1 changed files with 5 additions and 3 deletions
|
@ -101,9 +101,11 @@ class SettingsLang : PreferenceFragmentCompat() {
|
||||||
val names = enumValues<TvType>().sorted().map { it.name }
|
val names = enumValues<TvType>().sorted().map { it.name }
|
||||||
val default = enumValues<TvType>().sorted().filter { it != TvType.NSFW }.map { it.ordinal }
|
val default = enumValues<TvType>().sorted().filter { it != TvType.NSFW }.map { it.ordinal }
|
||||||
val defaultSet = default.map { it.toString() }.toSet()
|
val defaultSet = default.map { it.toString() }.toSet()
|
||||||
val currentList = settingsManager.getStringSet(getString(R.string.prefer_media_type_key), defaultSet)?.map {
|
val currentList = try {
|
||||||
|
settingsManager.getStringSet(getString(R.string.prefer_media_type_key), defaultSet)?.map {
|
||||||
it.toInt()
|
it.toInt()
|
||||||
} ?: default
|
}
|
||||||
|
} catch (e: Throwable) { null } ?: default
|
||||||
|
|
||||||
activity?.showMultiDialog(
|
activity?.showMultiDialog(
|
||||||
names,
|
names,
|
||||||
|
|
Loading…
Reference in a new issue