mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-27 04:07:10 +00:00
no need to get editorInfo for inputType
This commit is contained in:
parent
3bf7d0ea5c
commit
7adeb408cc
1 changed files with 1 additions and 2 deletions
|
@ -2104,9 +2104,8 @@ public final class InputLogic {
|
|||
}
|
||||
|
||||
private boolean textBeforeCursorMayBeUrlOrSimilar(final SettingsValues settingsValues, final Boolean forAutoSpace) {
|
||||
final EditorInfo ei = getCurrentInputEditorInfo();
|
||||
// URL / mail field and no space -> may be URL
|
||||
if (ei != null && (InputTypeUtils.isUriOrEmailType(ei.inputType)) &&
|
||||
if (InputTypeUtils.isUriOrEmailType(settingsValues.mInputAttributes.mInputType) &&
|
||||
// we never want to commit the first part of the url, but we want to insert autospace if text might be a normal word
|
||||
(forAutoSpace ? mConnection.nonWordCodePointAndNoSpaceBeforeCursor(settingsValues.mSpacingAndPunctuations) // avoid detecting URL if it could be a word
|
||||
: !mConnection.spaceBeforeCursor()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue