Fixed the bug that would cause the wifi name to not hide despite the option being selected.

This commit is contained in:
Jas Singh
2024-07-25 01:39:16 -07:00
parent aedb112a5c
commit b289c0b271

View File

@@ -10,9 +10,15 @@ const Network = () => {
}),
Widget.Label({
class_name: "bar-network-label",
label: network.wifi
.bind("ssid")
.as((ssid) => (ssid ? ` ${ssid}` : " --").substring(0, 7)),
label: Utils.merge(
[network.bind("wifi"), options.bar.network.label.bind("value")],
(wifi, showLabel) => {
if (showLabel) {
return wifi.ssid ? wifi.ssid.substring(0, 7) : " --";
}
return "";
},
),
}),
];