@@ -132,12 +132,15 @@ FocusScope {
132132 onResponded: root.responded(response)
133133 onSelected: root.selected(index)
134134 onSessionChooserButtonClicked: parent.state = "SessionsList"
135+ onCurrentIndexChanged: setCurrentSession()
135136
136− onCurrentIndexChanged: {
137+ Keys.forwardTo: [sessionChooserLoader.item]
138+
139+ Component.onCompleted: setCurrentSession()
140+
141+ function setCurrentSession() {
137142 currentSession = LightDMService.users.data(currentIndex, LightDMService.userRoles.SessionRole);
138143 }
139−
140− Keys.forwardTo: [sessionChooserLoader.item]
141144 }
142145
143146 Loader {