Add second Confirm Public Encrypted Room dialog
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
0d9bc00968
commit
5d6bc9a886
1 changed files with 18 additions and 1 deletions
|
@ -91,7 +91,24 @@ export default class SecurityRoomSettingsTab extends React.Component {
|
|||
if (refreshWhenTypes.includes(e.getType())) this.forceUpdate();
|
||||
};
|
||||
|
||||
_onEncryptionChange = (e) => {
|
||||
_onEncryptionChange = async (e) => {
|
||||
if (this.state.joinRule == "public") {
|
||||
const {finished} = Modal.createTrackedDialog('Confirm Public Encrypted Room', '', QuestionDialog, {
|
||||
title: _t('Enable encryption in a public room?'),
|
||||
description: _t(
|
||||
"Note that enabling encryption in public rooms renders the " +
|
||||
"encryption pointless, wastes processing power, and can cause " +
|
||||
"performance problems. Please consider creating a separate " +
|
||||
"encrypted room.",
|
||||
),
|
||||
});
|
||||
const [confirm] = await finished;
|
||||
if (!confirm) {
|
||||
this.setState({encrypted: false});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Modal.createTrackedDialog('Enable encryption', '', QuestionDialog, {
|
||||
title: _t('Enable encryption?'),
|
||||
description: _t(
|
||||
|
|
Loading…
Reference in a new issue