fix #43 (again)

This commit is contained in:
Cloudburst 2022-08-23 17:13:35 +02:00
parent 032ac325e5
commit 8ff2540f4b

View file

@ -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 {
it.toInt() settingsManager.getStringSet(getString(R.string.prefer_media_type_key), defaultSet)?.map {
} ?: default it.toInt()
}
} catch (e: Throwable) { null } ?: default
activity?.showMultiDialog( activity?.showMultiDialog(
names, names,