kcms/hotspot: fix switch

This commit is contained in:
Yari Polla 2023-03-14 15:36:05 +01:00
parent 1e2847ef96
commit f47ba93952

View file

@ -17,15 +17,20 @@ SimpleKCM {
id: handler
}
PlasmaNM.WirelessStatus {
id: wirelessStatus
}
Kirigami.FormLayout {
Controls.Switch {
id: hotspotToggle
Kirigami.FormData.label: i18n("Enabled:")
checked: wirelessStatus.hotspotSSID.length !== 0
onToggled: {
if (hotspotToggle.checked) {
handler.createHotspot()
handler.createHotspot();
} else {
handler.stopHotspot()
handler.stopHotspot();
}
}
}