Ask for confirmation before activating encryption in a room

This commit is contained in:
Tobias Fella
2022-11-17 23:24:30 +01:00
parent 74cf615e53
commit b282c335d4
3 changed files with 56 additions and 1 deletions

View File

@@ -154,7 +154,11 @@ Kirigami.OverlayDrawer {
text: i18n("Enable encryption")
display: QQC2.AbstractButton.IconOnly
onClicked: roomDrawer.room.activateEncryption()
onClicked: {
let dialog = confirmEncryptionDialog.createObject(applicationWindow(), {room: roomDrawer.room});
roomDrawer.close();
dialog.open();
}
QQC2.ToolTip {
text: encryptButton.text
@@ -357,4 +361,10 @@ Kirigami.OverlayDrawer {
UserDetailDialog {}
}
Component {
id: confirmEncryptionDialog
ConfirmEncryptionDialog {}
}
}