When leaving room, try to go to previous page

This commit is contained in:
miruka
2019-11-09 14:21:01 -04:00
parent 46ff911bfa
commit de59948214
2 changed files with 7 additions and 2 deletions

View File

@@ -21,7 +21,11 @@ HPage {
onRoomInfoChanged: {
if (roomInfo.left) {
// If left, the room will most likely be gone on client restart
// If left, the room will most likely be gone on client restart.
// Try to switch back to the previous page.
if (pageLoader.showPrevious()) return
// If there wasn't any previous page, show default page.
window.uiState.page = "Pages/Default.qml"
window.uiState.pageProperties = {}
window.uiStateChanged()