Tier 0: render what the services already decided, honestly
Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
@@ -9,6 +9,7 @@ import Quickshell
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Networking
|
||||
import qs.config
|
||||
import qs.services
|
||||
import qs.widgets
|
||||
|
||||
Item {
|
||||
@@ -45,18 +46,22 @@ Item {
|
||||
return list;
|
||||
}
|
||||
|
||||
function syncScanner(): void {
|
||||
if (root.device)
|
||||
root.device.scannerEnabled = root.active;
|
||||
// The scan is held, not switched. This picker and the settings page both
|
||||
// list the same radio, and each writing scannerEnabled from its own
|
||||
// visibility flag meant the last one to change its mind decided for both --
|
||||
// closing the settings page stopped the scan under this panel, which then
|
||||
// said "Scanning…" over a radio that had stopped. Connectivity counts the
|
||||
// holds; nothing here touches the device.
|
||||
readonly property string scanHold: "quicksettings-wifi"
|
||||
|
||||
onActiveChanged: {
|
||||
if (root.active)
|
||||
Connectivity.acquireWifiScan(root.scanHold);
|
||||
else
|
||||
Connectivity.releaseWifiScan(root.scanHold);
|
||||
}
|
||||
|
||||
onActiveChanged: root.syncScanner()
|
||||
onDeviceChanged: root.syncScanner()
|
||||
Component.onCompleted: root.syncScanner()
|
||||
Component.onDestruction: {
|
||||
if (root.device)
|
||||
root.device.scannerEnabled = false;
|
||||
}
|
||||
Component.onDestruction: Connectivity.releaseWifiScan(root.scanHold)
|
||||
|
||||
function signalIcon(strength: real): string {
|
||||
if (strength >= 0.8)
|
||||
|
||||
Reference in New Issue
Block a user