diff --git a/src/extension.ts b/src/extension.ts index a1f7469..3b825b3 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -21,7 +21,6 @@ import { type ConnectedInfo, } from './wifiInfo.js'; import { - WIFI_GENERATIONS, GENERATION_CSS_CLASSES, getGenerationLabel, getGenerationDescription, @@ -325,18 +324,17 @@ export default class WifiSignalPlusExtension extends Extension { } private updateIndicatorLabel(info: WifiConnectionInfo): void { - if (!this.icon || !this.label) return; + if (!this.indicator || !this.icon || !this.label) return; this.clearGenerationStyles(); if (!isConnected(info)) { - this.icon.visible = false; - this.label.visible = true; - this.label.set_text('WiFi --'); - this.label.add_style_class_name(GENERATION_CSS_CLASSES[WIFI_GENERATIONS.UNKNOWN]); + this.indicator.visible = false; return; } + this.indicator.visible = true; + const iconFilename = getGenerationIconFilename(info.generation); if (iconFilename) { const iconPath = GLib.build_filenamev([this.path, 'icons', iconFilename]);