fix bluetooth _busy pattern, remove stale dismiss(), trigger network panel refresh on bar monitor events

This commit is contained in:
Damocles 2026-04-16 00:47:52 +02:00
parent 928cd79475
commit 0923596b4b
4 changed files with 12 additions and 3 deletions

View file

@ -76,7 +76,7 @@ M.BarSection {
required property var bar required property var bar
readonly property bool _anyHover: root._hovered || bluetoothMenu.panelHovered readonly property bool _anyHover: root._hovered || bluetoothMenu.panelHovered || bluetoothMenu._busy
M.BluetoothMenu { M.BluetoothMenu {
id: bluetoothMenu id: bluetoothMenu

View file

@ -12,6 +12,8 @@ M.HoverPanel {
onVisibleChanged: if (visible) onVisibleChanged: if (visible)
scanner.running = true scanner.running = true
readonly property bool _busy: powerProc.running || toggleProc.running
property var _devices: [] property var _devices: []
property bool _btEnabled: true property bool _btEnabled: true
@ -196,7 +198,6 @@ M.HoverPanel {
toggleProc.action = entry.modelData.connected ? "disconnect" : "connect"; toggleProc.action = entry.modelData.connected ? "disconnect" : "connect";
toggleProc.mac = entry.modelData.mac; toggleProc.mac = entry.modelData.mac;
toggleProc.running = true; toggleProc.running = true;
menuWindow.dismiss();
} }
} }
} }

View file

@ -63,7 +63,10 @@ M.BarSection {
Timer { Timer {
id: _debounce id: _debounce
interval: 300 interval: 300
onTriggered: proc.running = true onTriggered: {
proc.running = true;
networkMenu.triggerRefresh();
}
} }
// Fallback poll // Fallback poll
Timer { Timer {

View file

@ -14,6 +14,11 @@ M.HoverPanel {
readonly property bool _busy: connectProc.running || disconnectProc.running || radioProc.running readonly property bool _busy: connectProc.running || disconnectProc.running || radioProc.running
function triggerRefresh() {
if (visible)
scanner.running = true;
}
property var _networks: [] property var _networks: []
property bool _wifiEnabled: true property bool _wifiEnabled: true