mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-16 18:01:57 +02:00
cancel on dialog close
This commit is contained in:
parent
05403eb98c
commit
46e63fd571
@ -26,10 +26,15 @@ export default class VerificationRequestDialog extends React.Component {
|
||||
onFinished: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
this.onFinished = this.onFinished.bind(this);
|
||||
}
|
||||
|
||||
render() {
|
||||
const BaseDialog = sdk.getComponent("views.dialogs.BaseDialog");
|
||||
const EncryptionPanel = sdk.getComponent("views.right_panel.EncryptionPanel");
|
||||
return <BaseDialog className="mx_InfoDialog" onFinished={this.props.onFinished}
|
||||
return <BaseDialog className="mx_InfoDialog" onFinished={this.onFinished}
|
||||
contentId="mx_Dialog_content"
|
||||
title={_t("Verification Request")}
|
||||
hasCancel={true}
|
||||
@ -42,4 +47,9 @@ export default class VerificationRequestDialog extends React.Component {
|
||||
/>
|
||||
</BaseDialog>;
|
||||
}
|
||||
|
||||
onFinished() {
|
||||
this.props.verificationRequest.cancel();
|
||||
this.props.onFinished();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user