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

@ -7,7 +7,6 @@ import qs.Commons
import qs.Services
import qs.Widgets
NIconButton {
id: root
@ -52,31 +51,4 @@ NIconButton {
Logger.error("WiFi", "Error toggling panel:", error)
}
}
Loader {
id: wifiPanel
source: "WiFiPanel.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
}
}
}
}