mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Update shouldSuppressSuggestions to be less suppressive
This commit is contained in:
parent
58a21d7782
commit
d1abf44bc0
@ -101,14 +101,13 @@ public final class InputAttributes {
|
|||||||
final boolean flagAutoComplete =
|
final boolean flagAutoComplete =
|
||||||
0 != (inputType & InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE);
|
0 != (inputType & InputType.TYPE_TEXT_FLAG_AUTO_COMPLETE);
|
||||||
|
|
||||||
|
final boolean forceNoSuggestionsByPrivateFlag = editorInfo.privateImeOptions != null
|
||||||
|
&& editorInfo.privateImeOptions.contains("org.futo.inputmethod.latin.NoSuggestions=1");
|
||||||
|
|
||||||
// TODO: Have a helper method in InputTypeUtils
|
// TODO: Have a helper method in InputTypeUtils
|
||||||
// Make sure that passwords are not displayed in {@link SuggestionStripView}.
|
// Make sure that passwords are not displayed in {@link SuggestionStripView}.
|
||||||
final boolean shouldSuppressSuggestions = mIsPasswordField
|
final boolean shouldSuppressSuggestions = mIsPasswordField
|
||||||
//|| InputTypeUtils.isEmailVariation(variation)
|
|| forceNoSuggestionsByPrivateFlag;
|
||||||
//|| InputType.TYPE_TEXT_VARIATION_URI == variation
|
|
||||||
//|| InputType.TYPE_TEXT_VARIATION_FILTER == variation
|
|
||||||
//|| flagNoSuggestions
|
|
||||||
|| flagAutoComplete;
|
|
||||||
mShouldShowSuggestions = !shouldSuppressSuggestions;
|
mShouldShowSuggestions = !shouldSuppressSuggestions;
|
||||||
|
|
||||||
mShouldInsertSpacesAutomatically = InputTypeUtils.isAutoSpaceFriendlyType(inputType);
|
mShouldInsertSpacesAutomatically = InputTypeUtils.isAutoSpaceFriendlyType(inputType);
|
||||||
@ -155,7 +154,7 @@ public final class InputAttributes {
|
|||||||
noLearning = (mEditorInfo.imeOptions & EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING) != 0;
|
noLearning = (mEditorInfo.imeOptions & EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
mNoLearning = noLearning;
|
mNoLearning = noLearning || mIsPasswordField;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isTypeNull() {
|
public boolean isTypeNull() {
|
||||||
|
@ -34,7 +34,8 @@ fun AndroidTextInput(allowPredictions: Boolean = true) {
|
|||||||
inputType = EditorInfo.TYPE_CLASS_TEXT
|
inputType = EditorInfo.TYPE_CLASS_TEXT
|
||||||
isSingleLine = false
|
isSingleLine = false
|
||||||
} else {
|
} else {
|
||||||
inputType = EditorInfo.TYPE_CLASS_TEXT or EditorInfo.TYPE_TEXT_FLAG_AUTO_COMPLETE
|
inputType = EditorInfo.TYPE_CLASS_TEXT
|
||||||
|
privateImeOptions = "org.futo.inputmethod.latin.NoSuggestions=1"
|
||||||
isSingleLine = true
|
isSingleLine = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user