Show confirmation dialog when leaving a room via the context menu
This commit is contained in:
parent
5ae73bf8fd
commit
0ac550ecbb
@ -61,9 +61,19 @@ Page {
|
||||
}
|
||||
}
|
||||
|
||||
Platform.MessageDialog {
|
||||
id: leaveRoomDialog
|
||||
|
||||
title: qsTr("Leave Room")
|
||||
text: qsTr("Are you sure you want to leave this room?")
|
||||
modality: Qt.Modal
|
||||
onAccepted: Rooms.leave(roomContextMenu.roomid)
|
||||
buttons: Dialog.Ok | Dialog.Cancel
|
||||
}
|
||||
|
||||
Platform.MenuItem {
|
||||
text: qsTr("Leave room")
|
||||
onTriggered: Rooms.leave(roomContextMenu.roomid)
|
||||
onTriggered: leaveRoomDialog.open()
|
||||
}
|
||||
|
||||
Platform.MenuSeparator {
|
||||
|
@ -219,7 +219,7 @@ ApplicationWindow {
|
||||
title: qsTr("End-to-End Encryption")
|
||||
text: qsTr("Encryption is currently experimental and things might break unexpectedly. <br>
|
||||
Please take note that it can't be disabled afterwards.")
|
||||
modality: Qt.NonModal
|
||||
modality: Qt.Modal
|
||||
onAccepted: {
|
||||
if (roomSettings.isEncryptionEnabled)
|
||||
return ;
|
||||
|
Loading…
Reference in New Issue
Block a user