diff options
Diffstat (limited to 'src/state/models/session.ts')
-rw-r--r-- | src/state/models/session.ts | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/state/models/session.ts b/src/state/models/session.ts index ec3a7fc03..ced7ceeb0 100644 --- a/src/state/models/session.ts +++ b/src/state/models/session.ts @@ -124,6 +124,9 @@ export class SessionModel { try { const sess = await this.rootStore.api.todo.adx.getSession({}) if (sess.success && this.data && this.data.userdid === sess.data.did) { + this.rootStore.me.load().catch(e => { + console.error('Failed to fetch local user information', e) + }) return // success } } catch (e: any) {} @@ -156,6 +159,9 @@ export class SessionModel { userdid: res.data.did, }) this.configureApi() + this.rootStore.me.load().catch(e => { + console.error('Failed to fetch local user information', e) + }) } } @@ -186,6 +192,9 @@ export class SessionModel { }) this.setOnboardingStage(OnboardingStage.Init) this.configureApi() + this.rootStore.me.load().catch(e => { + console.error('Failed to fetch local user information', e) + }) } } @@ -195,7 +204,7 @@ export class SessionModel { console.error('(Minor issue) Failed to delete session on the server', e) }) } - this.clear() + this.rootStore.clearAll() } setOnboardingStage(stage: OnboardingStage | null) { |