diff options
author | Eric Bailey <git@esb.lol> | 2023-11-10 09:59:04 -0600 |
---|---|---|
committer | Eric Bailey <git@esb.lol> | 2023-11-10 09:59:04 -0600 |
commit | 436a14eabb4fe2238ff6048f41042433c0e07268 (patch) | |
tree | 047882fe839963796eaa31e908702e3ccd9e86e0 /src/state/models/root-store.ts | |
parent | d0d93168d4a33c9fc06f84fd3aa98bef6f5f90f0 (diff) | |
download | voidsky-436a14eabb4fe2238ff6048f41042433c0e07268.tar.zst |
Pare down session as much as possible
Diffstat (limited to 'src/state/models/root-store.ts')
-rw-r--r-- | src/state/models/root-store.ts | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/src/state/models/root-store.ts b/src/state/models/root-store.ts index d11e9a148..4085a52c3 100644 --- a/src/state/models/root-store.ts +++ b/src/state/models/root-store.ts @@ -63,7 +63,6 @@ export class RootStoreModel { serialize(): unknown { return { appInfo: this.appInfo, - session: this.session.serialize(), me: this.me.serialize(), preferences: this.preferences.serialize(), } @@ -80,9 +79,6 @@ export class RootStoreModel { if (hasProp(v, 'me')) { this.me.hydrate(v.me) } - if (hasProp(v, 'session')) { - this.session.hydrate(v.session) - } if (hasProp(v, 'preferences')) { this.preferences.hydrate(v.preferences) } @@ -92,18 +88,7 @@ export class RootStoreModel { /** * Called during init to resume any stored session. */ - async attemptSessionResumption() { - logger.debug('RootStoreModel:attemptSessionResumption') - try { - await this.session.attemptSessionResumption() - logger.debug('Session initialized', { - hasSession: this.session.hasSession, - }) - this.updateSessionState() - } catch (e: any) { - logger.warn('Failed to initialize session', {error: e}) - } - } + async attemptSessionResumption() {} /** * Called by the session model. Refreshes session-oriented state. @@ -135,11 +120,10 @@ export class RootStoreModel { } /** - * Clears all session-oriented state. + * Clears all session-oriented state, previously called on LOGOUT */ clearAllSessionState() { logger.debug('RootStoreModel:clearAllSessionState') - this.session.clear() resetToTab('HomeTab') this.me.clear() } |