mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
Fix logout not working properly after moving logic to UserStore
This commit is contained in:
parent
2ad2ea242d
commit
b24e66ed11
@ -45,25 +45,21 @@ class UserStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onLogoutCurrentUser() {
|
onLogoutCurrentUser() {
|
||||||
this.getInstance()
|
this.getInstance().performLogoutCurrentUser();
|
||||||
.performLogoutCurrentUser()
|
|
||||||
.then(() => {
|
|
||||||
EventActions.userDidLogout();
|
|
||||||
|
|
||||||
// Reset all stores back to their initial state
|
|
||||||
alt.recycle();
|
|
||||||
altWhitelabel.recycle();
|
|
||||||
altUser.recycle();
|
|
||||||
altThirdParty.recycle();
|
|
||||||
|
|
||||||
// Since we've just logged out, we can set this store's
|
|
||||||
// hasLoaded flag back to true as there is no current user.
|
|
||||||
this.userMeta.hasLoaded = true;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onSuccessLogoutCurrentUser() {
|
onSuccessLogoutCurrentUser() {
|
||||||
this.currentUser = {};
|
EventActions.userDidLogout();
|
||||||
|
|
||||||
|
// Reset all stores back to their initial state
|
||||||
|
alt.recycle();
|
||||||
|
altWhitelabel.recycle();
|
||||||
|
altUser.recycle();
|
||||||
|
altThirdParty.recycle();
|
||||||
|
|
||||||
|
// Since we've just logged out, we can set this store's
|
||||||
|
// hasLoaded flag back to true as there is no current user.
|
||||||
|
this.userMeta.hasLoaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
onErrorCurrentUser(err) {
|
onErrorCurrentUser(err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user