Don't show 'connection lost' bar on MAU error

We don't need both warning bars

Requires https://github.com/matrix-org/matrix-js-sdk/pull/680
This commit is contained in:
David Baker 2018-08-03 18:02:09 +01:00
parent 4c6d5f50e9
commit ccdb5fa770
2 changed files with 26 additions and 11 deletions

View file

@ -1,7 +1,7 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2017 Vector Creations Ltd
Copyright 2017 New Vector Ltd
Copyright 2017, 2018 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -144,7 +144,9 @@ const LoggedInView = React.createClass({
},
onSync: function(syncState, oldSyncState, data) {
if (syncState === oldSyncState) return;
const oldErrCode = this.state.syncErrorData && this.state.syncErrorData.error && this.state.syncErrorData.error.errcode;
const newErrCode = data && data.error && data.error.errcode;
if (syncState === oldSyncState && oldErrCode === newErrCode) return;
if (syncState === 'ERROR') {
this.setState({