regression: fixed filtering not working in ModeIdeograms
This commit is contained in:
parent
8b77e22aa8
commit
d2fa8911da
1 changed files with 11 additions and 12 deletions
|
|
@ -87,22 +87,21 @@ abstract public class InputMode {
|
||||||
public void onAcceptSuggestion(@NonNull String word, boolean preserveWordList) {}
|
public void onAcceptSuggestion(@NonNull String word, boolean preserveWordList) {}
|
||||||
public void onCursorMove(@NonNull String word) { if (!digitSequence.isEmpty()) onAcceptSuggestion(word); }
|
public void onCursorMove(@NonNull String word) { if (!digitSequence.isEmpty()) onAcceptSuggestion(word); }
|
||||||
public boolean onReplaceSuggestion(@NonNull String rawWord) {
|
public boolean onReplaceSuggestion(@NonNull String rawWord) {
|
||||||
reset();
|
String newSequence = switch(rawWord) {
|
||||||
|
case SuggestionsBar.SHOW_SPECIAL_CHARS_SUGGESTION -> seq.SPECIAL_CHAR_SEQUENCE;
|
||||||
|
case SuggestionsBar.SHOW_CURRENCIES_SUGGESTION -> seq.CURRENCY_SEQUENCE;
|
||||||
|
default -> null;
|
||||||
|
};
|
||||||
|
|
||||||
boolean result = false;
|
if (newSequence == null) {
|
||||||
|
return false;
|
||||||
if (rawWord.equals(SuggestionsBar.SHOW_SPECIAL_CHARS_SUGGESTION)) {
|
|
||||||
digitSequence = seq.SPECIAL_CHAR_SEQUENCE;
|
|
||||||
loadSpecialCharacters();
|
|
||||||
result = true;
|
|
||||||
} else if (rawWord.equals(SuggestionsBar.SHOW_CURRENCIES_SUGGESTION)) {
|
|
||||||
digitSequence = seq.CURRENCY_SEQUENCE;
|
|
||||||
loadSpecialCharacters();
|
|
||||||
result = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reset();
|
||||||
|
digitSequence = newSequence;
|
||||||
|
loadSpecialCharacters();
|
||||||
onSuggestionsUpdated.run();
|
onSuggestionsUpdated.run();
|
||||||
return result;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue