diff options
author | Ansh Nanda <anshnanda10@gmail.com> | 2023-05-23 15:28:46 -0700 |
---|---|---|
committer | Ansh Nanda <anshnanda10@gmail.com> | 2023-05-23 15:28:46 -0700 |
commit | fc9e28ca72ce498df8d0902c8e51d226affefd83 (patch) | |
tree | 4f9d54dd7e2cc59852d81d6bf29ea53bec830eca /src/state/models/ui/preferences.ts | |
parent | b561a51ed9f798194c3c6a72eefab562a773f2c9 (diff) | |
download | voidsky-fc9e28ca72ce498df8d0902c8e51d226affefd83.tar.zst |
slight performance improvements
Diffstat (limited to 'src/state/models/ui/preferences.ts')
-rw-r--r-- | src/state/models/ui/preferences.ts | 8 |
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( |