Add clarifying comments for two-call pattern in handleButtonsClickedWithoutLongPressSupport

Co-authored-by: jonasbark <1151304+jonasbark@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-14 07:51:10 +00:00
parent d8a528017d
commit 15dc34b2ea

View File

@@ -79,7 +79,10 @@ abstract class BaseDevice {
await handleButtonsClicked([], longPress: true);
} else {
// For non-long-press actions: perform a single click
// First call performs the click action (isKeyDown: true, isKeyUp: true)
await handleButtonsClicked(clickedButtons, longPress: false);
// Second call cleans up state (clears timer, logs release, clears _previouslyPressedButtons)
// but doesn't perform a release action since longPress: false
await handleButtonsClicked([], longPress: false);
}
} else {