Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/kmcaster.git

Merge duplicate timer stop call

Author DaveJarvis <email>
Date 2020-08-04 16:31:44 GMT-0700
Commit 5ce6f36dcde3efc25351a1861eafa11e2c2b3c1a
Parent 65dce9e
src/main/com/whitemagicsoftware/kmcaster/EventHandler.java
// Get the mouse timer, modifier key timer, or non-modifier key timer.
final var timer = getTimer( hwSwitch );
+ timer.stop();
if( hwSwitch.isKeyboard() ) {
if( hwState == SWITCH_RELEASED ) {
timer.addActionListener(
( event ) -> updateKeyboardLabel( switchState )
);
}
else {
- timer.stop();
updateKeyboardLabel( switchState );
}
}
else {
- timer.stop();
mMouseActions.add( hwSwitch );
updateMouseStatus( switchState );
Delta 1 line added, 2 lines removed, 1-line decrease