mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am a828f613
: Merge "Some more simplification"
* commit 'a828f613a8dfbeff6290f261bbbd5ff988fb99b6': Some more simplification
This commit is contained in:
commit
360a66cf75
@ -2107,13 +2107,11 @@ public class LatinIME extends InputMethodServiceCompatWrapper implements Keyboar
|
||||
CharSequence toLeft = ic.getTextBeforeCursor(1, 0);
|
||||
CharSequence toRight = ic.getTextAfterCursor(1, 0);
|
||||
if (!TextUtils.isEmpty(toLeft)
|
||||
&& !mSettingsValues.isWordSeparator(toLeft.charAt(0))
|
||||
&& !mSettingsValues.isSuggestedPunctuation(toLeft.charAt(0))) {
|
||||
&& !mSettingsValues.isWordSeparator(toLeft.charAt(0))) {
|
||||
return true;
|
||||
}
|
||||
if (!TextUtils.isEmpty(toRight)
|
||||
&& !mSettingsValues.isWordSeparator(toRight.charAt(0))
|
||||
&& !mSettingsValues.isSuggestedPunctuation(toRight.charAt(0))) {
|
||||
&& !mSettingsValues.isWordSeparator(toRight.charAt(0))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -222,10 +222,6 @@ public class SettingsValues {
|
||||
res.getBoolean(R.bool.config_default_vibration_enabled));
|
||||
}
|
||||
|
||||
public boolean isSuggestedPunctuation(int code) {
|
||||
return mSuggestPuncs.contains(String.valueOf((char)code));
|
||||
}
|
||||
|
||||
public boolean isWordSeparator(int code) {
|
||||
return mWordSeparators.contains(String.valueOf((char)code));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user