From 15dc34b2eacb10774939b8bc6c3ef2d99febb663 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 14 Feb 2026 07:51:10 +0000 Subject: [PATCH] Add clarifying comments for two-call pattern in handleButtonsClickedWithoutLongPressSupport Co-authored-by: jonasbark <1151304+jonasbark@users.noreply.github.com> --- lib/bluetooth/devices/base_device.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/bluetooth/devices/base_device.dart b/lib/bluetooth/devices/base_device.dart index 5456d18..df2a132 100644 --- a/lib/bluetooth/devices/base_device.dart +++ b/lib/bluetooth/devices/base_device.dart @@ -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 {