From 82e4dff2abd287997521b0fce3e46b8cb00fcebf Mon Sep 17 00:00:00 2001 From: miruka Date: Thu, 12 Dec 2019 10:33:52 -0400 Subject: [PATCH] Fix left rooms appearing as joined rooms --- TODO.md | 1 - src/qml/Chat/Chat.qml | 14 -------------- src/qml/Chat/ChatPage.qml | 11 ++++++----- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/TODO.md b/TODO.md index 0889d0d3..436ed156 100644 --- a/TODO.md +++ b/TODO.md @@ -46,7 +46,6 @@ - Message order isn't preserved when sending a first message in a E2E room, then while keys are being shared sending one with another account, then sending one with the first account again - - Left rooms reappear as joined rooms - If account not in config anymore, discard ui state last page on startup - Do something when access token is invalid diff --git a/src/qml/Chat/Chat.qml b/src/qml/Chat/Chat.qml index 8c092e25..e886ac5c 100644 --- a/src/qml/Chat/Chat.qml +++ b/src/qml/Chat/Chat.qml @@ -26,20 +26,6 @@ Item { readonly property alias roomPane: roomPane - onRoomInfoChanged: { - if (roomInfo.left) { - // 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() - } - } - - HLoader { id: loader anchors.rightMargin: roomPane.visibleSize diff --git a/src/qml/Chat/ChatPage.qml b/src/qml/Chat/ChatPage.qml index c80e9e5c..1229e4bf 100644 --- a/src/qml/Chat/ChatPage.qml +++ b/src/qml/Chat/ChatPage.qml @@ -52,15 +52,16 @@ HPage { Layout.fillWidth: true } + LeftBanner { + id: leftBanner + visible: chat.roomInfo.left + Layout.fillWidth: true + } + Composer { id: composer visible: ! chat.roomInfo.left && ! chat.roomInfo.inviter_id } - LeftBanner { - id: leftBanner - visible: chat.roomInfo.left - Layout.fillWidth: true - } }