centralize panel content-change grace period into HoverPanel.keepOpen()

This commit is contained in:
Damocles 2026-04-16 18:37:53 +02:00
parent 084ef1da75
commit 46f14d5d36
6 changed files with 36 additions and 19 deletions

View file

@ -12,8 +12,6 @@ M.HoverPanel {
onVisibleChanged: if (visible)
scanner.running = true
readonly property bool _busy: connectProc.running || disconnectProc.running || radioProc.running
function triggerRefresh() {
if (visible)
scanner.running = true;
@ -85,24 +83,30 @@ M.HoverPanel {
id: radioProc
property string _state: ""
command: ["nmcli", "radio", "wifi", _state]
onRunningChanged: if (!running)
scanner.running = true
onRunningChanged: if (!running) {
scanner.running = true;
menuWindow.keepOpen(500);
}
}
property Process _connectProc: Process {
id: connectProc
property string uuid: ""
command: ["nmcli", "connection", "up", uuid]
onRunningChanged: if (!running)
scanner.running = true
onRunningChanged: if (!running) {
scanner.running = true;
menuWindow.keepOpen(500);
}
}
property Process _disconnectProc: Process {
id: disconnectProc
property string uuid: ""
command: ["nmcli", "connection", "down", uuid]
onRunningChanged: if (!running)
scanner.running = true
onRunningChanged: if (!running) {
scanner.running = true;
menuWindow.keepOpen(500);
}
}
// Wi-Fi radio toggle header