1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-07 22:15:38 -05:00

net: updates to accomodate iwd + other backends

This commit is contained in:
bbedward
2025-10-24 23:58:55 -04:00
parent d88dc17b21
commit d0ae7431eb
5 changed files with 51 additions and 46 deletions

View File

@@ -11,6 +11,7 @@ Singleton {
id: root
property bool networkAvailable: activeService !== null
property string backend: activeService?.backend ?? ""
property string networkStatus: activeService?.networkStatus ?? "disconnected"
property string primaryConnection: activeService?.primaryConnection ?? ""
@@ -97,16 +98,16 @@ Singleton {
}
Connections {
target: NetworkManagerService
target: DMSNetworkService
function onNetworkAvailableChanged() {
if (!activeService && NetworkManagerService.networkAvailable) {
console.info("NetworkService: Network capability detected, using NetworkManagerService")
activeService = NetworkManagerService
if (!activeService && DMSNetworkService.networkAvailable) {
console.info("NetworkService: Network capability detected, using DMSNetworkService")
activeService = DMSNetworkService
usingLegacy = false
console.info("NetworkService: Switched to NetworkManagerService, networkAvailable:", networkAvailable)
console.info("NetworkService: Switched to DMSNetworkService, networkAvailable:", networkAvailable)
connectSignals()
} else if (!activeService && !NetworkManagerService.networkAvailable && socketPath && socketPath.length > 0) {
} else if (!activeService && !DMSNetworkService.networkAvailable && socketPath && socketPath.length > 0) {
console.info("NetworkService: Network capability not available in DMS, using LegacyNetworkService")
useLegacyService()
}