Fix link opening (#512)
parent
af2fd3cf29
commit
2b96279103
|
@ -119,12 +119,17 @@ export class RootStoreModel {
|
||||||
/**
|
/**
|
||||||
* Called by the session model. Refreshes session-oriented state.
|
* 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.log.debug('RootStoreModel:handleSessionChange')
|
||||||
this.agent = agent
|
this.agent = agent
|
||||||
this.me.clear()
|
this.me.clear()
|
||||||
await this.me.load()
|
await this.me.load()
|
||||||
resetNavigation()
|
if (!hadSession) {
|
||||||
|
resetNavigation()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -158,11 +158,12 @@ export class SessionModel {
|
||||||
*/
|
*/
|
||||||
async setActiveSession(agent: BskyAgent, did: string) {
|
async setActiveSession(agent: BskyAgent, did: string) {
|
||||||
this._log('SessionModel:setActiveSession')
|
this._log('SessionModel:setActiveSession')
|
||||||
|
const hadSession = !!this.data
|
||||||
this.data = {
|
this.data = {
|
||||||
service: agent.service.toString(),
|
service: agent.service.toString(),
|
||||||
did,
|
did,
|
||||||
}
|
}
|
||||||
await this.rootStore.handleSessionChange(agent)
|
await this.rootStore.handleSessionChange(agent, {hadSession})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue