You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
... and take action when the counter reaches zero in verification toast
This commit is contained in:
@@ -38,6 +38,11 @@ export default class VerificationRequestToast extends React.PureComponent {
|
||||
let {counter} = this.state;
|
||||
counter = Math.max(0, counter - 1);
|
||||
this.setState({counter});
|
||||
|
||||
if (counter == 0) {
|
||||
clearInterval(this._intervalHandle);
|
||||
this.cancel();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
request.on("change", this._checkRequestIsPending);
|
||||
|
||||
Reference in New Issue
Block a user