mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 04:58:49 +03:00
Show confirmation dialog when leaving a room via the context menu
This commit is contained in:
parent
5ae73bf8fd
commit
0ac550ecbb
2 changed files with 12 additions and 2 deletions
|
@ -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 a new issue