mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
am 6d77ae9d
: Merge "Remove KeyboardStart.isInMomentarySwitchState"
* commit '6d77ae9d815679eb653be986eb72d34ecc72d379': Remove KeyboardStart.isInMomentarySwitchState
This commit is contained in:
commit
8521186c3f
@ -335,10 +335,6 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isInMomentarySwitchState() {
|
||||
return mState.isInMomentarySwitchState();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates state machine to figure out when to automatically switch back to the previous mode.
|
||||
*/
|
||||
|
@ -315,9 +315,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||
default:
|
||||
final int longpressTimeout =
|
||||
Settings.getInstance().getCurrent().mKeyLongpressTimeout;
|
||||
if (KeyboardSwitcher.getInstance().isInMomentarySwitchState()) {
|
||||
// We use longer timeout for sliding finger input started from the symbols
|
||||
// mode key.
|
||||
if (tracker.isInSlidingKeyInputFromModifier()) {
|
||||
// We use longer timeout for sliding finger input started from the modifier key.
|
||||
delay = longpressTimeout * 3;
|
||||
} else {
|
||||
delay = longpressTimeout;
|
||||
|
@ -574,11 +574,6 @@ public final class KeyboardState {
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isInMomentarySwitchState() {
|
||||
return mSwitchState == SWITCH_STATE_MOMENTARY_ALPHA_AND_SYMBOL
|
||||
|| mSwitchState == SWITCH_STATE_MOMENTARY_SYMBOL_AND_MORE;
|
||||
}
|
||||
|
||||
private static boolean isSpaceCharacter(final int c) {
|
||||
return c == Constants.CODE_SPACE || c == Constants.CODE_ENTER;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user