Merge pull request #2182 from matrix-org/travis/warn-disconnect-early

Show the 'homeserver unavailable' warning when the first sync fails
pull/21833/head
Travis Ralston 2018-09-28 07:55:07 -06:00 committed by GitHub
commit a1cb6d64cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1261,8 +1261,8 @@ export default React.createClass({
// its own dispatch).
dis.dispatch({action: 'sync_state', prevState, state});
if (state === "ERROR") {
self.setState({syncError: data.error});
if (state === "ERROR" || state === "RECONNECTING") {
self.setState({syncError: data.error || true});
} else if (self.state.syncError) {
self.setState({syncError: null});
}