From fcdfce3760076787a57e6032417f30d0f98785a8 Mon Sep 17 00:00:00 2001 From: Kegan Dougal Date: Mon, 11 Jan 2016 15:12:55 +0000 Subject: [PATCH] Toggle auto-reg off when successfully registered as a guest. Otherwise if you refresh -> auto-reg -> logout, you will get an infinite spinner as it will think it is auto-registering again. --- src/components/structures/MatrixChat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 118b43ef9a..320dad09b3 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -152,6 +152,7 @@ module.exports = React.createClass({ ); MatrixClientPeg.get().registerGuest().done(function(creds) { console.log("Registered as guest: %s", creds.user_id); + self._setAutoRegisterAsGuest(false); self.onLoggedIn({ userId: creds.user_id, accessToken: creds.access_token, @@ -185,7 +186,6 @@ module.exports = React.createClass({ MatrixClientPeg.get().stopClient(); MatrixClientPeg.get().removeAllListeners(); MatrixClientPeg.unset(); - this.notifyNewScreen('login'); this.replaceState({ logged_in: false,