Skip to content

Learn new words also when auto-correction is disabled - #903

Open
MiMoHo wants to merge 1 commit into
openboard-team:masterfrom
MiMoHo:fix/learn-words-without-autocorrect
Open

MiMoHo wants to merge 1 commit into
openboard-team:masterfrom
MiMoHo:fix/learn-words-without-autocorrect

Conversation

@MiMoHo

@MiMoHo MiMoHo commented Jul 6, 2026

Copy link
Copy Markdown

Summary

Typed words are never learned when auto-correction is disabled (#726, #452): InputLogic.performAdditionToUserHistoryDictionary() returns early whenever mAutoCorrectionEnabledPerUserSettings is false. Users who type with suggestions but without auto-correction never see their own words offered as suggestions.

Fix

Gate learning on "auto-correction or suggestions enabled" instead of auto-correction alone:

  • suggestions on, auto-correction off → words are now learned (the reported bug)
  • auto-correction on (any suggestion setting) → unchanged, still learns
  • both off → still no learning (privacy-conservative default preserved)
  • password fields force isSuggestionsEnabledPerUserSettings() to false and incognito mode still disables learning entirely, so the original intent of the check — no unintended additions from sensitive fields — is preserved.

Testing

Builds with the stock toolchain; keyboard smoke-tested on an Android 15 emulator (typing, suggestions). The condition change is deliberately minimal — a strict widening from autoCorrect to autoCorrect || suggestions, so no existing learning path is removed.

Fixes #726

🤖 Generated with Claude Code

…#726)

performAdditionToUserHistoryDictionary() returned early whenever
auto-correction was turned off, so users who type with suggestions but
without auto-correction never got their words learned - typed words
were never offered as suggestions later (issues openboard-team#726, openboard-team#452).

Gate learning on 'auto-correction OR suggestions enabled' instead.
Sensitive fields keep their protection: password fields force
isSuggestionsEnabledPerUserSettings() to false, and incognito mode
still disables learning entirely.

Fixes openboard-team#726

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@MiMoHo
MiMoHo force-pushed the fix/learn-words-without-autocorrect branch from b338ea3 to 13d1560 Compare September 9, 2026 15:22
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.

Automatic word learning not working

1 participant