summary refs log tree commit diff
path: root/resources/qml/RoomList.qml
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2021-07-22 15:07:33 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2021-07-22 15:07:33 +0200
commit0ac550ecbb77c8aa3e3427c466f1be2c436a42aa (patch)
treee34bb1b4350963d4807eab8a37a41ca1a379779c /resources/qml/RoomList.qml
parentAdd trailing newline to session export to make gomuks happy (diff)
downloadnheko-0ac550ecbb77c8aa3e3427c466f1be2c436a42aa.tar.xz
Show confirmation dialog when leaving a room via the context menu
Diffstat (limited to 'resources/qml/RoomList.qml')
-rw-r--r--resources/qml/RoomList.qml12
1 files changed, 11 insertions, 1 deletions
diff --git a/resources/qml/RoomList.qml b/resources/qml/RoomList.qml
index 9dac5830..2be5fe92 100644
--- a/resources/qml/RoomList.qml
+++ b/resources/qml/RoomList.qml
@@ -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 {