From 16b2fb7fe624ff66e59241c5b1207245c15393de Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Thu, 27 Sep 2018 14:31:55 -0600 Subject: [PATCH] Show the 'homeserver unavailable' warning when the first sync fails Fixes https://github.com/vector-im/riot-web/issues/7380 --- src/components/structures/MatrixChat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 71e61cda22..c2b99d2765 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -1253,8 +1253,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}); }