Skip to content

fix(dict): never blacklist main dictionary words when removing a suggestion (#861) - #868

Merged
LeanBitLab merged 1 commit into
mainfrom
fix/861-blacklist-main-dict-case
Nov 18, 2026
Merged

LeanBitLab merged 1 commit into
mainfrom
fix/861-blacklist-main-dict-case

Conversation

@LeanBitLab

Copy link
Copy Markdown
Owner

Fixes #861.

Problem

Removing a suggestion blacklists the word unless it is in the main dictionary. That check only used the lowercase form, while blacklist matching ignores case. Removing "I'm" checked "i'm" (not in the dictionary, which stores "I'm"), so "I'm" was blocked permanently. The same applies to "I" and proper nouns.

With several languages enabled, the check ran per dictionary group, so a word of one language was blacklisted through another language's group, and isBlacklisted blocks it everywhere.

Fix

  • DictionaryGroup.isMainDictWord() checks the original, lowercase, capitalized and uppercase forms.
  • DictionaryFacilitatorImpl.removeWord decides once across all groups and passes the result to each group.
  • Non-dictionary entries such as "I,m" are still blacklisted.

Words that are already blacklisted stay blocked; users remove them once in Settings > Blocked words.

Verification

  • New test DictionaryGroupTest.testRemoveWord_DoesNotBlacklistCapitalizedMainDictWord
  • ./gradlew :app:testStandardDebugUnitTest --tests "helium314.keyboard.latin.DictionaryGroupTest" passes

…estion (#861)

Blacklist matching ignores case, but removeWord only checked the lowercase
form against the main dictionary, so removing "I'm" blacklisted "i'm".
Check all case variants and decide once across dictionary groups, so a word
of one language is not blacklisted through another language's group.
@LeanBitLab
LeanBitLab merged commit 37dc847 into main Nov 18, 2026
1 check passed
@LeanBitLab
LeanBitLab deleted the fix/861-blacklist-main-dict-case branch November 18, 2026 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: autocorrection for "I'm" broken after update

1 participant