diff --git a/imports/NeoChat/Page/RoomPage.qml b/imports/NeoChat/Page/RoomPage.qml index 642e5da5e..88bc30f13 100644 --- a/imports/NeoChat/Page/RoomPage.qml +++ b/imports/NeoChat/Page/RoomPage.qml @@ -28,6 +28,8 @@ Kirigami.ScrollablePage { title: currentRoom.htmlSafeDisplayName + KeyNavigation.left: pageStack.get(0) + Connections { target: RoomManager function onCurrentRoomChanged() { diff --git a/qml/main.qml b/qml/main.qml index 672572b88..e79fdbb6e 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -31,9 +31,7 @@ Kirigami.ApplicationWindow { property bool roomListLoaded: false - property RoomPage roomPage: RoomPage { - KeyNavigation.left: pageStack.get(0) - } + property RoomPage roomPage Connections { target: root.quitAction @@ -80,7 +78,7 @@ Kirigami.ApplicationWindow { target: RoomManager function onPushRoom(room, event) { - pageStack.push(root.roomPage); + root.roomPage = pageStack.push("qrc:/imports/NeoChat/Page/RoomPage.qml"); root.roomPage.forceActiveFocus(); if (event.length > 0) { roomPage.goToEvent(event);