diff --git a/app/src/main/java/helium314/keyboard/settings/screens/DictionaryScreen.kt b/app/src/main/java/helium314/keyboard/settings/screens/DictionaryScreen.kt index bdc92f8bb..c9f56d9ca 100644 --- a/app/src/main/java/helium314/keyboard/settings/screens/DictionaryScreen.kt +++ b/app/src/main/java/helium314/keyboard/settings/screens/DictionaryScreen.kt @@ -57,8 +57,11 @@ fun DictionaryScreen( val enabledLanguages = SubtypeSettings.getEnabledSubtypes(true).map { it.locale().language } val cachedDictFolders = DictionaryInfoUtils.getCacheDirectories(ctx).map { it.name } val comparer = compareBy({ it.language !in enabledLanguages }, { it.toLanguageTag() !in cachedDictFolders}, { it.displayName }) - val dictionaryLocales = remember { getDictionaryLocales(ctx).sortedWith(comparer).toMutableList() } - dictionaryLocales.add(0, Locale(SubtypeLocaleUtils.NO_LANGUAGE)) + val dictionaryLocales = remember { + getDictionaryLocales(ctx).sortedWith(comparer).toMutableList().apply { + add(0, Locale(SubtypeLocaleUtils.NO_LANGUAGE)) + } + } var selectedLocale: Locale? by remember { mutableStateOf(null) } var showAddDictDialog by remember { mutableStateOf(false) } val dictPicker = dictionaryFilePicker(selectedLocale)