Post refactoring fixes 3/?
This commit is contained in:
parent
258bb37533
commit
c371ea68a3
4 changed files with 21 additions and 17 deletions
|
|
@ -1,6 +1,9 @@
|
|||
pragma Singleton
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import qs.Commons
|
||||
|
||||
Singleton {
|
||||
id: root
|
||||
|
|
@ -14,6 +17,14 @@ Singleton {
|
|||
property string lastConnectedNetwork: ""
|
||||
property bool isLoading: false
|
||||
|
||||
Component.onCompleted: {
|
||||
console.log("[Network] Service started")
|
||||
// Only refresh networks if WiFi is enabled
|
||||
if (Settings.data.network.wifiEnabled) {
|
||||
refreshNetworks()
|
||||
}
|
||||
}
|
||||
|
||||
function signalIcon(signal) {
|
||||
if (signal >= 80)
|
||||
return "network_wifi"
|
||||
|
|
@ -252,7 +263,7 @@ Singleton {
|
|||
for (var i = 0; i < lines.length; ++i) {
|
||||
const line = lines[i].trim()
|
||||
if (!line)
|
||||
continue
|
||||
continue
|
||||
|
||||
const parts = line.split(":")
|
||||
if (parts.length < 2) {
|
||||
|
|
@ -291,7 +302,7 @@ Singleton {
|
|||
for (var i = 0; i < lines.length; ++i) {
|
||||
const line = lines[i].trim()
|
||||
if (!line)
|
||||
continue
|
||||
continue
|
||||
|
||||
const parts = line.split(":")
|
||||
if (parts.length < 4) {
|
||||
|
|
@ -456,11 +467,4 @@ Singleton {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
// Only refresh networks if WiFi is enabled
|
||||
if (Settings.data.network.wifiEnabled) {
|
||||
refreshNetworks()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue