Fix link opening (#512)

zio/stable
Paul Frazee 2023-04-21 20:28:19 -05:00 committed by GitHub
parent af2fd3cf29
commit 2b96279103
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -119,12 +119,17 @@ export class RootStoreModel {
/**
* Called by the session model. Refreshes session-oriented state.
*/
async handleSessionChange(agent: BskyAgent) {
async handleSessionChange(
agent: BskyAgent,
{hadSession}: {hadSession: boolean},
) {
this.log.debug('RootStoreModel:handleSessionChange')
this.agent = agent
this.me.clear()
await this.me.load()
resetNavigation()
if (!hadSession) {
resetNavigation()
}
}
/**

View File

@ -158,11 +158,12 @@ export class SessionModel {
*/
async setActiveSession(agent: BskyAgent, did: string) {
this._log('SessionModel:setActiveSession')
const hadSession = !!this.data
this.data = {
service: agent.service.toString(),
did,
}
await this.rootStore.handleSessionChange(agent)
await this.rootStore.handleSessionChange(agent, {hadSession})
}
/**