Cancel deferred actions

if the set mxid dialog is canceled
This commit is contained in:
David Baker 2017-06-05 18:37:38 +01:00
parent 3553aea5df
commit f6cfff9098
2 changed files with 8 additions and 0 deletions

View File

@ -676,6 +676,9 @@ module.exports = React.createClass({
homeserverUrl: MatrixClientPeg.get().getHomeserverUrl(),
onFinished: (submitted, credentials) => {
if (!submitted) {
dis.dispatch({
action: 'cancel_after_sync_prepared',
});
return;
}
this.onRegistered(credentials);

View File

@ -45,6 +45,11 @@ class LifecycleStore extends Store {
deferred_action: payload.deferred_action,
});
break;
case 'cancel_after_sync_prepared':
this._setState({
deferred_action: null,
});
break;
case 'sync_state':
if (payload.state !== 'PREPARED') {
break;