diff --git a/config/quickshell/Services/IpService.qml b/config/quickshell/Services/IpService.qml index 52cf565..d62c92e 100644 --- a/config/quickshell/Services/IpService.qml +++ b/config/quickshell/Services/IpService.qml @@ -82,9 +82,11 @@ Singleton { fetchTimer.start(); } - Component.onCompleted: { - } - onIpChanged: { + function updateAlias() { + if (!ip || ip === "N/A") { + alias = ""; + return ; + } alias = ""; for (let i = 0; i < aliasFileAdapter.aliases.length; i++) { let entry = aliasFileAdapter.aliases[i]; @@ -96,6 +98,13 @@ Singleton { } } + Component.onCompleted: () => { + return updateAlias(); + } + onIpChanged: () => { + return updateAlias(); + } + NetworkFetch { id: curl }