mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Post refactoring fixes 3/?
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user