mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 03:00:18 +02:00
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:
1 parent
43e19d17f6
commit
c69ea6266f
3 files changed
+12
-6
No files matched your search
+4
-2
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user