mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
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 default = enumValues<TvType>().sorted().filter { it != TvType.NSFW }.map { it.ordinal }
|
||||
val defaultSet = default.map { it.toString() }.toSet()
|
||||
val currentList = settingsManager.getStringSet(getString(R.string.prefer_media_type_key), defaultSet)?.map {
|
||||
it.toInt()
|
||||
} ?: default
|
||||
val currentList = try {
|
||||
settingsManager.getStringSet(getString(R.string.prefer_media_type_key), defaultSet)?.map {
|
||||
it.toInt()
|
||||
}
|
||||
} catch (e: Throwable) { null } ?: default
|
||||
|
||||
activity?.showMultiDialog(
|
||||
names,
|
||||
|
|
Loading…
Reference in a new issue