kcms/wifi: Fix toggle not updating the first time

Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/363
This commit is contained in:
Devin Lin 2024-06-27 22:53:29 -04:00
parent 8f9db42e8f
commit 1dfcda39d3

View file

@ -86,7 +86,7 @@ SimpleKCM {
id: wifiSwitch id: wifiSwitch
text: i18n("Wi-Fi") text: i18n("Wi-Fi")
checked: enabledConnections.wirelessEnabled checked: enabledConnections.wirelessEnabled
onClicked: { onCheckedChanged: {
handler.enableWireless(checked); handler.enableWireless(checked);
checked = Qt.binding(() => enabledConnections.wirelessEnabled); checked = Qt.binding(() => enabledConnections.wirelessEnabled);
} }