Refactor room leaving

The old code has a small bug where the room would not be left in certain
conditions.
This commit is contained in:
Tobias Fella
2021-08-10 18:47:21 +02:00
committed by Carl Schwan
parent 21bd5fa94e
commit ecc639fb0a
2 changed files with 14 additions and 7 deletions

View File

@@ -28,6 +28,17 @@ Kirigami.ScrollablePage {
title: currentRoom.displayName
Connections {
target: RoomManager
function onCurrentRoomChanged() {
if(!RoomManager.currentRoom) {
if(pageStack.lastItem == page) {
pageStack.pop()
}
}
}
}
signal switchRoomUp()
signal switchRoomDown()