about summary refs log tree commit diff
path: root/src/state/models/profiles-view.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-17 13:01:57 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-17 13:01:57 -0600
commit5d7f3e1863a2d1a0542b1885fdcf107f7e21d6e9 (patch)
treee286594bbb99197d51194c97ee70b1cd88b1b795 /src/state/models/profiles-view.ts
parent0d70a097779716a3334811d25f04a6706e7ba38e (diff)
downloadvoidsky-5d7f3e1863a2d1a0542b1885fdcf107f7e21d6e9.tar.zst
Invalidate profiles cache on direct load
Diffstat (limited to 'src/state/models/profiles-view.ts')
-rw-r--r--src/state/models/profiles-view.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/state/models/profiles-view.ts b/src/state/models/profiles-view.ts
index 4dc5a3999..d9fe98b3f 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)
+    }
+  }
 }