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.
This commit is contained in:
parent
a3df50f4c3
commit
fcdfce3760
1 changed files with 1 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue