mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-01 11:03:18 +03:00
... and take action when the counter reaches zero in verification toast
This commit is contained in:
parent
7e98ea79d2
commit
49d2ed8906
1 changed files with 5 additions and 0 deletions
|
@ -38,6 +38,11 @@ export default class VerificationRequestToast extends React.PureComponent {
|
||||||
let {counter} = this.state;
|
let {counter} = this.state;
|
||||||
counter = Math.max(0, counter - 1);
|
counter = Math.max(0, counter - 1);
|
||||||
this.setState({counter});
|
this.setState({counter});
|
||||||
|
|
||||||
|
if (counter == 0) {
|
||||||
|
clearInterval(this._intervalHandle);
|
||||||
|
this.cancel();
|
||||||
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
request.on("change", this._checkRequestIsPending);
|
request.on("change", this._checkRequestIsPending);
|
||||||
|
|
Loading…
Reference in a new issue