Skip to content
Snippets Groups Projects
Verified Commit 0ac550ec authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Show confirmation dialog when leaving a room via the context menu

parent 5ae73bf8
No related branches found
No related tags found
No related merge requests found
Pipeline #1447 passed
......@@ -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 ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment