sorts the subtitles languages list

This commit is contained in:
shantanu1k 2022-11-08 22:02:31 +05:30
parent 019a5b1bec
commit 9f4723a057

View File

@ -40,7 +40,7 @@ class PlayerSettings : BasePreferenceFragment() {
} }
private fun setupSubtitlePref(preference: ListPreference) { private fun setupSubtitlePref(preference: ListPreference) {
val locales = LocaleHelper.getAvailableLocales() val locales = LocaleHelper.getAvailableLocales().sortedBy { it.name }
val localeNames = locales.map { it.name } val localeNames = locales.map { it.name }
.toMutableList() .toMutableList()
localeNames.add(0, requireContext().getString(R.string.none)) localeNames.add(0, requireContext().getString(R.string.none))