Fix broken accept/decline invitation.

This commit is contained in:
Black Hat 2018-09-11 14:58:07 +08:00
parent 421316aa00
commit ebe69fd4c0
1 changed files with 10 additions and 1 deletions

View File

@ -119,7 +119,14 @@ Item {
roomContextMenu.room = currentRoom roomContextMenu.room = currentRoom
roomContextMenu.popup() roomContextMenu.popup()
} }
onPrimaryClicked: category === RoomType.Invited ? inviteDialog.open() : enteredRoom = currentRoom onPrimaryClicked: {
if (category === RoomType.Invited) {
inviteDialog.currentRoom = currentRoom
inviteDialog.open()
} else {
enteredRoom = currentRoom
}
}
ToolTip.visible: MSettings.miniMode && containsMouse ToolTip.visible: MSettings.miniMode && containsMouse
ToolTip.text: name ToolTip.text: name
@ -205,6 +212,8 @@ Item {
RoomContextMenu { id: roomContextMenu } RoomContextMenu { id: roomContextMenu }
Dialog { Dialog {
property var currentRoom
id: inviteDialog id: inviteDialog
parent: ApplicationWindow.overlay parent: ApplicationWindow.overlay