Unset matrix client first otherwise login sets it, the it gets unset and you can't log in again.
This commit is contained in:
parent
53a7f4b3a8
commit
e158eec94d
1 changed files with 4 additions and 4 deletions
|
@ -85,10 +85,6 @@ module.exports = {
|
||||||
var self = this;
|
var self = this;
|
||||||
switch (payload.action) {
|
switch (payload.action) {
|
||||||
case 'logout':
|
case 'logout':
|
||||||
this.replaceState({
|
|
||||||
logged_in: false,
|
|
||||||
ready: false
|
|
||||||
});
|
|
||||||
if (window.localStorage) {
|
if (window.localStorage) {
|
||||||
window.localStorage.clear();
|
window.localStorage.clear();
|
||||||
}
|
}
|
||||||
|
@ -98,6 +94,10 @@ module.exports = {
|
||||||
MatrixClientPeg.get().removeAllListeners();
|
MatrixClientPeg.get().removeAllListeners();
|
||||||
MatrixClientPeg.unset();
|
MatrixClientPeg.unset();
|
||||||
this.notifyNewScreen('login');
|
this.notifyNewScreen('login');
|
||||||
|
this.replaceState({
|
||||||
|
logged_in: false,
|
||||||
|
ready: false
|
||||||
|
});
|
||||||
break;
|
break;
|
||||||
case 'start_registration':
|
case 'start_registration':
|
||||||
if (this.state.logged_in) return;
|
if (this.state.logged_in) return;
|
||||||
|
|
Loading…
Reference in a new issue