about summary refs log tree commit diff
path: root/src/state/models/ui/preferences.ts
diff options
context:
space:
mode:
authorAnsh Nanda <anshnanda10@gmail.com>2023-05-23 15:28:46 -0700
committerAnsh Nanda <anshnanda10@gmail.com>2023-05-23 15:28:46 -0700
commitfc9e28ca72ce498df8d0902c8e51d226affefd83 (patch)
tree4f9d54dd7e2cc59852d81d6bf29ea53bec830eca /src/state/models/ui/preferences.ts
parentb561a51ed9f798194c3c6a72eefab562a773f2c9 (diff)
downloadvoidsky-fc9e28ca72ce498df8d0902c8e51d226affefd83.tar.zst
slight performance improvements
Diffstat (limited to 'src/state/models/ui/preferences.ts')
-rw-r--r--src/state/models/ui/preferences.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/state/models/ui/preferences.ts b/src/state/models/ui/preferences.ts
index c4b6da0f6..dcf6b9a7a 100644
--- a/src/state/models/ui/preferences.ts
+++ b/src/state/models/ui/preferences.ts
@@ -292,11 +292,15 @@ export class PreferencesModel {
     return res
   }
 
+  setFeeds(saved: string[], pinned: string[]) {
+    this.savedFeeds = saved
+    this.pinnedFeeds = pinned
+  }
+
   async setSavedFeeds(saved: string[], pinned: string[]) {
     const oldSaved = this.savedFeeds
     const oldPinned = this.pinnedFeeds
-    this.savedFeeds = saved
-    this.pinnedFeeds = pinned
+    this.setFeeds(saved, pinned)
     try {
       await this.update((prefs: AppBskyActorDefs.Preferences) => {
         const existing = prefs.find(