Skip to content

Commit

Permalink
Clean up config trigger changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasbrailo committed Aug 22, 2021
1 parent 3349758 commit d27c6d6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app/src/main/java/com/nicobrailo/pianoli/AppConfigTrigger.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ private void reset() {
// new NextExpectedKey and move the icon around whenever the user presses a key
if (pressedConfigKeys.size() > 0) {
nextKeyPress = getNextExpectedKey();
pressedConfigKeys.clear();
}

pressedConfigKeys.clear();
}

private void showConfigDialogue() {
Expand Down Expand Up @@ -87,15 +88,13 @@ void onKeyPress(int key_idx) {
} else {
nextKeyPress = getNextExpectedKey();
}
} else {
reset();
}
}

void onKeyUp(int key_idx) {
if (pressedConfigKeys.contains(key_idx)) {
reset();
} else {
reset();
}
reset();
}

void onPianoRedrawFinish(PianoCanvas piano, Canvas canvas) {
Expand Down

0 comments on commit d27c6d6

Please sign in to comment.