diff --git a/src/components/views/messages/MKeyVerificationRequest.js b/src/components/views/messages/MKeyVerificationRequest.js index ab02b2e5ad..9a48858bc7 100644 --- a/src/components/views/messages/MKeyVerificationRequest.js +++ b/src/components/views/messages/MKeyVerificationRequest.js @@ -27,6 +27,7 @@ import {RIGHT_PANEL_PHASES} from "../../../stores/RightPanelStorePhases"; export default class MKeyVerificationRequest extends React.Component { constructor(props) { super(props); + this.state = {}; } componentDidMount() { @@ -58,6 +59,7 @@ export default class MKeyVerificationRequest extends React.Component { }; _onAcceptClicked = async () => { + this.setState({acceptOrCancelClicked: true}); const request = this.props.mxEvent.verificationRequest; if (request) { try { @@ -70,6 +72,7 @@ export default class MKeyVerificationRequest extends React.Component { }; _onRejectClicked = async () => { + this.setState({acceptOrCancelClicked: true}); const request = this.props.mxEvent.verificationRequest; if (request) { try { @@ -135,9 +138,10 @@ export default class MKeyVerificationRequest extends React.Component { subtitle = (
{ userLabelForEventRoom(request.requestingUserId, mxEvent.getRoomId())}
); if (request.requested && !request.observeOnly) { + const disabled = this.state.acceptOrCancelClicked; stateNode = (
- - + +
); } } else { // request sent by us