diff --git a/applets/userswitcher/package/contents/ui/main.qml b/applets/userswitcher/package/contents/ui/main.qml --- a/applets/userswitcher/package/contents/ui/main.qml +++ b/applets/userswitcher/package/contents/ui/main.qml @@ -132,15 +132,6 @@ id: sessionsModel } - Connections { - target: plasmoid - onExpandedChanged: { - if (plasmoid.expanded) { - sessionsModel.reload() - } - } - } - PlasmaComponents.Highlight { id: delegateHighlight visible: false @@ -249,5 +240,13 @@ onClicked: pmEngine.performOperation("requestShutDown") } } + + Component.onCompleted: { + plasmoid.expandedChanged.connect(function (expanded) { + if (expanded) { + sessionsModel.reload(); + } + }); + } } }