diff options
author | Jaz <ericvolp12@gmail.com> | 2023-05-30 18:25:29 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-30 18:25:29 -0700 |
commit | 09ade363fdcfadb03433385e0c5510bc58438a65 (patch) | |
tree | 710af28d1eb7f70acf81f86acb44759439e164fc /src/state/models/me.ts | |
parent | 7f76c2d67e62ba2d10e8b17673a7bbcf7248564f (diff) | |
parent | e224569a11b82361d782324a63bdfc19d44a3201 (diff) | |
download | voidsky-09ade363fdcfadb03433385e0c5510bc58438a65.tar.zst |
Merge branch 'main' into inherit_system_theme
Diffstat (limited to 'src/state/models/me.ts')
-rw-r--r-- | src/state/models/me.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/state/models/me.ts b/src/state/models/me.ts index ba2dc6f32..815044857 100644 --- a/src/state/models/me.ts +++ b/src/state/models/me.ts @@ -8,6 +8,7 @@ import {PostsFeedModel} from './feeds/posts' import {NotificationsFeedModel} from './feeds/notifications' import {MyFollowsCache} from './cache/my-follows' import {isObj, hasProp} from 'lib/type-guards' +import {SavedFeedsModel} from './ui/saved-feeds' const PROFILE_UPDATE_INTERVAL = 10 * 60 * 1e3 // 10min const NOTIFS_UPDATE_INTERVAL = 30 * 1e3 // 30sec @@ -21,6 +22,7 @@ export class MeModel { followsCount: number | undefined followersCount: number | undefined mainFeed: PostsFeedModel + savedFeeds: SavedFeedsModel notifications: NotificationsFeedModel follows: MyFollowsCache invites: ComAtprotoServerDefs.InviteCode[] = [] @@ -43,12 +45,14 @@ export class MeModel { }) this.notifications = new NotificationsFeedModel(this.rootStore) this.follows = new MyFollowsCache(this.rootStore) + this.savedFeeds = new SavedFeedsModel(this.rootStore) } clear() { this.mainFeed.clear() this.notifications.clear() this.follows.clear() + this.savedFeeds.clear() this.did = '' this.handle = '' this.displayName = '' @@ -110,6 +114,7 @@ export class MeModel { /* dont await */ this.notifications.setup().catch(e => { this.rootStore.log.error('Failed to setup notifications model', e) }) + /* dont await */ this.savedFeeds.refresh(true) this.rootStore.emitSessionLoaded() await this.fetchInviteCodes() await this.fetchAppPasswords() @@ -119,6 +124,7 @@ export class MeModel { } async updateIfNeeded() { + /* dont await */ this.savedFeeds.refresh(true) if (Date.now() - this.lastProfileStateUpdate > PROFILE_UPDATE_INTERVAL) { this.rootStore.log.debug('Updating me profile information') this.lastProfileStateUpdate = Date.now() |