Merge pull request #1039 from matrix-org/dbkr/ilag_cancel_action

Cancel deferred actions
pull/21833/head
David Baker 2017-06-05 21:27:13 +01:00 committed by GitHub
commit a99f6525c9
2 changed files with 8 additions and 0 deletions

View File

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

View File

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