mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-09 08:07:42 +00:00
avoid dictionary re-ordering on UI interaction
This commit is contained in:
parent
7dbf5ea86d
commit
97aec851e4
1 changed files with 1 additions and 1 deletions
|
@ -57,7 +57,7 @@ fun DictionaryScreen(
|
|||
val enabledLanguages = SubtypeSettings.getEnabledSubtypes(true).map { it.locale().language }
|
||||
val cachedDictFolders = DictionaryInfoUtils.getCacheDirectories(ctx).map { it.name }
|
||||
val comparer = compareBy<Locale>({ it.language !in enabledLanguages }, { it.toLanguageTag() !in cachedDictFolders}, { it.displayName })
|
||||
val dictionaryLocales = getDictionaryLocales(ctx).sortedWith(comparer).toMutableList()
|
||||
val dictionaryLocales = remember { getDictionaryLocales(ctx).sortedWith(comparer).toMutableList() }
|
||||
dictionaryLocales.add(0, Locale(SubtypeLocaleUtils.NO_LANGUAGE))
|
||||
var selectedLocale: Locale? by remember { mutableStateOf(null) }
|
||||
var showAddDictDialog by remember { mutableStateOf(false) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue