mirror of
https://github.com/jonasbark/swiftcontrol.git
synced 2026-02-18 00:17:40 +01:00
Add clarifying comments for two-call pattern in handleButtonsClickedWithoutLongPressSupport
Co-authored-by: jonasbark <1151304+jonasbark@users.noreply.github.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user