diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts index 2cb48193..8386fbbc 100644 --- a/src/state/models/profile-view.ts +++ b/src/state/models/profile-view.ts @@ -140,6 +140,7 @@ export class ProfileViewModel { const res = await this.rootStore.api.app.bsky.actor.getProfile( this.params, ) + this.rootStore.profiles.overwrite(this.params.actor, res) // cache invalidation this._replaceAll(res) this._xIdle() } catch (e: any) { diff --git a/src/state/models/profiles-view.ts b/src/state/models/profiles-view.ts index 4dc5a399..d9fe98b3 100644 --- a/src/state/models/profiles-view.ts +++ b/src/state/models/profiles-view.ts @@ -41,4 +41,10 @@ export class ProfilesViewModel { throw e } } + + overwrite(did: string, res: GetProfile.Response) { + if (this.cache.has(did)) { + this.cache.set(did, res) + } + } }