mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
kcms/wifi: Fix toggle not updating the first time
Fixes https://invent.kde.org/plasma/plasma-mobile/-/issues/363
This commit is contained in:
parent
8f9db42e8f
commit
1dfcda39d3
1 changed files with 5 additions and 5 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
// SPDX-License-Identifier: LGPL-2.0-or-later
|
// SPDX-License-Identifier: LGPL-2.0-or-later
|
||||||
|
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls as Controls
|
import QtQuick.Controls as Controls
|
||||||
|
|
||||||
import org.kde.plasma.networkmanagement as PlasmaNM
|
import org.kde.plasma.networkmanagement as PlasmaNM
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
@ -119,11 +119,11 @@ SimpleKCM {
|
||||||
model: mobileProxyModel
|
model: mobileProxyModel
|
||||||
delegate: ConnectionItemDelegate {
|
delegate: ConnectionItemDelegate {
|
||||||
editMode: root.editMode
|
editMode: root.editMode
|
||||||
|
|
||||||
// connected or saved
|
// connected or saved
|
||||||
property bool shouldDisplay: (Uuid != "") || ConnectionState === PlasmaNM.Enums.Activated
|
property bool shouldDisplay: (Uuid != "") || ConnectionState === PlasmaNM.Enums.Activated
|
||||||
onShouldDisplayChanged: savedCard.updateCount()
|
onShouldDisplayChanged: savedCard.updateCount()
|
||||||
|
|
||||||
// separate property for visible since visible is false when the whole card is not visible
|
// separate property for visible since visible is false when the whole card is not visible
|
||||||
visible: shouldDisplay
|
visible: shouldDisplay
|
||||||
}
|
}
|
||||||
|
|
@ -159,7 +159,7 @@ SimpleKCM {
|
||||||
|
|
||||||
property bool shouldDisplay: !((Uuid != "") || ConnectionState === PlasmaNM.Enums.Activated)
|
property bool shouldDisplay: !((Uuid != "") || ConnectionState === PlasmaNM.Enums.Activated)
|
||||||
onShouldDisplayChanged: availableCard.updateCount()
|
onShouldDisplayChanged: availableCard.updateCount()
|
||||||
|
|
||||||
visible: shouldDisplay
|
visible: shouldDisplay
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue