When a room is left, set UI state to default page

This commit is contained in:
miruka 2019-08-16 01:31:46 -04:00
parent 69a3f4377d
commit 729235fe6a

View File

@ -18,6 +18,14 @@ HPage {
readonly property var roomInfo: Utils.getItem( readonly property var roomInfo: Utils.getItem(
modelSources[["Room", userId]] || [], "room_id", roomId modelSources[["Room", userId]] || [], "room_id", roomId
) || "waiting" ) || "waiting"
onRoomInfoChanged: {
if (roomInfo.left) {
// The room will most likely be gone on client restart
window.uiState.page = "Pages/Default.qml"
window.uiState.pageProperties = {}
window.uiStateChanged()
}
}
readonly property bool hasUnknownDevices: false readonly property bool hasUnknownDevices: false