Chat InviteBanner: make decline button spawn popup

Rather than leaving the room as soon as the button is clicked.
This offers the option of also forgetting that room, and will allow
checking a future "ignore inviter" too.
This commit is contained in:
miruka
2021-04-13 15:54:43 -04:00
parent 70ae16a7c1
commit 3683d7db20
2 changed files with 15 additions and 6 deletions

View File

@@ -14,6 +14,7 @@ HFlickableColumnPopup {
property string roomName: ""
property string inviterId: ""
property bool left: false
property var leftCallback: null
function forget() {
py.callClientCoro(userId, "room_forget", [roomId], () => {
@@ -30,7 +31,7 @@ HFlickableColumnPopup {
}
function leave() {
py.callClientCoro(userId, "room_leave", [roomId])
py.callClientCoro(userId, "room_leave", [roomId], leftCallback)
popup.close()
}