mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-08 07:37:41 +00:00
autocorrect for shortcuts specified in user dictionary
This commit is contained in:
parent
169e0feb20
commit
52d50a6de6
2 changed files with 3 additions and 6 deletions
|
@ -375,11 +375,7 @@ public final class Suggest {
|
|||
// list, "will" would always auto-correct to "Will" which is unwanted. Hence, no
|
||||
// main dict => no auto-correct. Also, it would probably get obnoxious quickly.
|
||||
// TODO: now that we have personalization, we may want to re-evaluate this decision
|
||||
|| !dictionaryFacilitator.hasAtLeastOneInitializedMainDictionary()
|
||||
// If the first suggestion is a shortcut we never auto-correct to it, regardless
|
||||
// of how strong it is (whitelist entries are not KIND_SHORTCUT but KIND_WHITELIST).
|
||||
// TODO: we may want to have shortcut-only entries auto-correct in the future.
|
||||
|| suggestionResults.first().isKindOf(SuggestedWordInfo.KIND_SHORTCUT)) {
|
||||
|| !dictionaryFacilitator.hasAtLeastOneInitializedMainDictionary()) {
|
||||
hasAutoCorrection = false;
|
||||
} else {
|
||||
final SuggestedWordInfo firstSuggestion = suggestionResults.first();
|
||||
|
|
|
@ -348,7 +348,8 @@ public class SuggestedWords {
|
|||
}
|
||||
|
||||
public boolean isAppropriateForAutoCorrection() {
|
||||
return (mKindAndFlags & KIND_FLAG_APPROPRIATE_FOR_AUTO_CORRECTION) != 0;
|
||||
return (mKindAndFlags & KIND_FLAG_APPROPRIATE_FOR_AUTO_CORRECTION) != 0
|
||||
|| isKindOf(KIND_SHORTCUT);
|
||||
}
|
||||
|
||||
public void setDebugString(final String str) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue