From 68f8db3834d26b89adaecab39c9d9febee7c917c Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 10 Aug 2016 14:34:44 +0100 Subject: [PATCH] Avoid flashing up login screen during guest registration Fix a bug where we would flash up the login screen during guest registration if you followed a room link. --- src/components/structures/MatrixChat.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index b69537d006..9f2d09a62d 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -791,11 +791,10 @@ module.exports = React.createClass({ // we can't view a room unless we're logged in // (a guest account is fine) if (!this.state.logged_in) { + // we may still be loading (ie, trying to register a guest + // session); otherwise we're (probably) already showing a login + // screen. Either way, we'll show the room once the client starts. this.starting_room_alias_payload = payload; - // Login is the default screen, so we'd do this anyway, - // but this will set the URL bar appropriately. - dis.dispatch({ action: 'start_login' }); - return; } else { dis.dispatch(payload); }