Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #3075 from matrix-org/dbkr/wait_for_token_request
Browse files Browse the repository at this point in the history
Look busy whilst requesting the email token
  • Loading branch information
dbkr authored Jun 6, 2019
2 parents b365c9d + aba329c commit a591a93
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/components/structures/InteractiveAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export default React.createClass({
sessionId: this.props.sessionId,
clientSecret: this.props.clientSecret,
emailSid: this.props.emailSid,
requestEmailToken: this.props.requestEmailToken,
requestEmailToken: this._requestEmailToken,
});

this._authLogic.attemptAuth().then((result) => {
Expand Down Expand Up @@ -135,6 +135,19 @@ export default React.createClass({
}
},

_requestEmailToken: async function(...args) {
this.setState({
busy: true,
});
try {
return await this.props.requestEmailToken(...args);
} finally {
this.setState({
busy: false,
});
}
},

tryContinue: function() {
if (this.refs.stageComponent && this.refs.stageComponent.tryContinue) {
this.refs.stageComponent.tryContinue();
Expand Down

0 comments on commit a591a93

Please sign in to comment.