Fix BT and WiFi panels

This commit is contained in:
LemmyCook 2025-08-22 12:25:28 -04:00
parent f441bec32d
commit 8bb6da5e0d
5 changed files with 10 additions and 56 deletions

View file

@ -32,31 +32,4 @@ NIconButton {
onClicked: {
bluetoothPanel.toggle(screen)
}
Loader {
id: bluetoothPanel
source: "BluetoothPanel.qml"
active: false
property var pendingToggleScreen: null
onStatusChanged: {
if (status === Loader.Ready && item && pendingToggleScreen !== null) {
item.toggle(pendingToggleScreen)
pendingToggleScreen = null
}
}
function toggle(screen) {
// Load the panel if it's not already loaded
if (!active) {
active = true
pendingToggleScreen = screen
} else if (status === Loader.Ready && item) {
item.toggle(screen)
} else {
pendingToggleScreen = screen
}
}
}
}