diff options
author | Paul Frazee <pfrazee@gmail.com> | 2023-08-03 09:44:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-03 09:44:43 -0700 |
commit | a63f97aef2ea70ff9f1b81d40073f36ae8e88278 (patch) | |
tree | bf93006d20d099b3dc80861e68a4bd1f53d2a097 /src/state/models/content/profile.ts | |
parent | 7256169506332c7935ced4e0babcbd07159b9402 (diff) | |
download | voidsky-a63f97aef2ea70ff9f1b81d40073f36ae8e88278.tar.zst |
Use a post and handle-resolution cache to enable quick postthread loading (#1097)
* Use a post and handle-resolution cache to enable quick postthread loading * Fix positioning of thread when loaded from cache and give more visual cues * Include parent posts in cache * Include notifications in cache
Diffstat (limited to 'src/state/models/content/profile.ts')
-rw-r--r-- | src/state/models/content/profile.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/state/models/content/profile.ts b/src/state/models/content/profile.ts index 34b2ea28e..c4cbe6d44 100644 --- a/src/state/models/content/profile.ts +++ b/src/state/models/content/profile.ts @@ -253,6 +253,12 @@ export class ProfileModel { try { const res = await this.rootStore.agent.getProfile(this.params) this.rootStore.profiles.overwrite(this.params.actor, res) // cache invalidation + if (res.data.handle) { + this.rootStore.handleResolutions.cache.set( + res.data.handle, + res.data.did, + ) + } this._replaceAll(res) await this._createRichText() this._xIdle() |