don't add single letter words with AddToPersonalDictionary setting

fixes GH-1605
This commit is contained in:
Helium314 2025-06-11 20:01:59 +02:00
parent 83ff9b3345
commit 9cec401e1e

View file

@ -381,6 +381,7 @@ class DictionaryFacilitatorImpl : DictionaryFacilitator {
}
private fun addToPersonalDictionaryIfInvalidButInHistory(word: String) {
if (word.length <= 1) return
val dictionaryGroup = clearlyPreferredDictionaryGroup ?: return
val userDict = dictionaryGroup.getSubDict(Dictionary.TYPE_USER) ?: return
val userHistoryDict = dictionaryGroup.getSubDict(Dictionary.TYPE_USER_HISTORY) ?: return