mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 22:14:58 +08:00
disable "verify by emoji" after clicking it
This commit is contained in:
parent
413a149b47
commit
577121e88d
@ -62,8 +62,9 @@ export default class VerificationPanel extends React.PureComponent {
|
||||
if (pending) {
|
||||
button = <Spinner />;
|
||||
} else {
|
||||
const disabled = this.state.emojiButtonClicked;
|
||||
button = (
|
||||
<AccessibleButton kind="primary" className="mx_UserInfo_wideButton" onClick={this._startSAS}>
|
||||
<AccessibleButton disabled={disabled} kind="primary" className="mx_UserInfo_wideButton" onClick={this._startSAS}>
|
||||
{_t("Verify by emoji")}
|
||||
</AccessibleButton>
|
||||
);
|
||||
@ -196,6 +197,7 @@ export default class VerificationPanel extends React.PureComponent {
|
||||
}
|
||||
|
||||
_startSAS = async () => {
|
||||
this.setState({emojiButtonClicked: true});
|
||||
const verifier = this.props.request.beginKeyVerification(verificationMethods.SAS);
|
||||
try {
|
||||
await verifier.verify();
|
||||
|
Loading…
Reference in New Issue
Block a user