Devices: fixes from review round 10

- Removing or moving the active headset's address waits for running installs,
  like switching.
- A volume change still waiting to be sent goes to the headset whose slider
  it was, and a switch cancels it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
saphidandClaude Opus 5.5 committed 2026-09-28 23:03:27 +10:00
1 parent 43e19d17f6
commit c69ea6266f
3 files changed
+12 -6

No files matched your search

+4 -2
View File
@@ -922,8 +922,10 @@ def devices_action(link, body, open_setup, busy=lambda: 0):
did = body.get("id")
active = link.active_device()
is_active = did == active["id"]
moves = action == "use" or (is_active and (action == "remove" or (
action == "update" and (body.get("user") is not None or body.get("port") is not None))))
moves = action == "use" or (is_active and (
action in ("remove", "address-remove")
or (action == "update" and (body.get("user") is not None or body.get("port") is not None))
or (action == "address-update" and body.get("newHost") not in (None, body.get("host")))))
if moves and busy():
raise frame_devices.DeviceError(
f"Wait for what's running on {active['name']} to finish (see the activity bar), then try again")