Fix rejecting and accepting invitations
This commit is contained in:
@@ -55,8 +55,8 @@ Kirigami.ScrollablePage {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Controller.activeConnection
|
target: Controller.activeConnection
|
||||||
function onJoinedRoom(room) {
|
function onJoinedRoom(room, invited) {
|
||||||
if(room.id === invitation.id) {
|
if(page.currentRoom.id === invited.id) {
|
||||||
RoomManager.enterRoom(room);
|
RoomManager.enterRoom(room);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -84,8 +84,6 @@ Kirigami.ScrollablePage {
|
|||||||
Kirigami.PlaceholderMessage {
|
Kirigami.PlaceholderMessage {
|
||||||
id: invitation
|
id: invitation
|
||||||
|
|
||||||
property var id
|
|
||||||
|
|
||||||
visible: currentRoom && currentRoom.isInvite
|
visible: currentRoom && currentRoom.isInvite
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
text: i18n("Accept this invitation?")
|
text: i18n("Accept this invitation?")
|
||||||
@@ -94,7 +92,7 @@ Kirigami.ScrollablePage {
|
|||||||
Layout.alignment : Qt.AlignHCenter
|
Layout.alignment : Qt.AlignHCenter
|
||||||
text: i18n("Reject")
|
text: i18n("Reject")
|
||||||
|
|
||||||
onClicked: RoomManager.leave(page.currentRoom);
|
onClicked: RoomManager.leaveRoom(page.currentRoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
QQC2.Button {
|
QQC2.Button {
|
||||||
@@ -103,8 +101,6 @@ Kirigami.ScrollablePage {
|
|||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
currentRoom.acceptInvitation();
|
currentRoom.acceptInvitation();
|
||||||
invitation.id = currentRoom.id
|
|
||||||
currentRoom = null
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user