disable "verify by emoji" after clicking it
This commit is contained in:
parent
413a149b47
commit
577121e88d
1 changed files with 3 additions and 1 deletions
|
@ -62,8 +62,9 @@ export default class VerificationPanel extends React.PureComponent {
|
||||||
if (pending) {
|
if (pending) {
|
||||||
button = <Spinner />;
|
button = <Spinner />;
|
||||||
} else {
|
} else {
|
||||||
|
const disabled = this.state.emojiButtonClicked;
|
||||||
button = (
|
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")}
|
{_t("Verify by emoji")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
);
|
);
|
||||||
|
@ -196,6 +197,7 @@ export default class VerificationPanel extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
_startSAS = async () => {
|
_startSAS = async () => {
|
||||||
|
this.setState({emojiButtonClicked: true});
|
||||||
const verifier = this.props.request.beginKeyVerification(verificationMethods.SAS);
|
const verifier = this.props.request.beginKeyVerification(verificationMethods.SAS);
|
||||||
try {
|
try {
|
||||||
await verifier.verify();
|
await verifier.verify();
|
||||||
|
|
Loading…
Reference in a new issue