From 9432e2868592e265cfa74617c9b6e07aa34836d7 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Wed, 10 Feb 2021 23:13:16 +0100 Subject: [PATCH] Fix opening a second invitation --- imports/NeoChat/Page/RoomPage.qml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/imports/NeoChat/Page/RoomPage.qml b/imports/NeoChat/Page/RoomPage.qml index fa24de407..2024a3e92 100644 --- a/imports/NeoChat/Page/RoomPage.qml +++ b/imports/NeoChat/Page/RoomPage.qml @@ -65,7 +65,7 @@ Kirigami.ScrollablePage { property var id - visible: currentRoom.isInvite + visible: currentRoom && currentRoom.isInvite anchors.centerIn: parent text: i18n("Accept this invitation?") RowLayout { @@ -86,12 +86,20 @@ Kirigami.ScrollablePage { onClicked: { currentRoom.acceptInvitation(); invitation.id = currentRoom.id - invitation.visible = false + currentRoom = null } } } } + Kirigami.PlaceholderMessage { + anchors.centerIn: parent + visible: page.currentRoom === null || (messageListView.count === 0 && !page.currentRoom.allHistoryLoaded && !page.currentRoom.isInvite) + QQC2.BusyIndicator { + running: true + } + } + focus: true Keys.onTabPressed: { @@ -160,14 +168,6 @@ Kirigami.ScrollablePage { room: currentRoom } - Kirigami.PlaceholderMessage { - anchors.centerIn: parent - visible: messageListView.count === 0 && !currentRoom.allHistoryLoaded - QQC2.BusyIndicator { - running: true - } - } - QQC2.Popup { anchors.centerIn: parent