diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-10-04 12:55:25 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-10-04 12:55:25 -0500 |
commit | 5631c2d2e66f76f751370ab218505fbba96d0e93 (patch) | |
tree | e2db21e8dc0732c43089ec04735b90dfd7254caa /src/state/models/profile-ui.ts | |
parent | 236c9080587ad9e63fa3330d2567640ea2f64fb4 (diff) | |
download | voidsky-5631c2d2e66f76f751370ab218505fbba96d0e93.tar.zst |
Update to new get*Feed xrpc methods
Diffstat (limited to 'src/state/models/profile-ui.ts')
-rw-r--r-- | src/state/models/profile-ui.ts | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/state/models/profile-ui.ts b/src/state/models/profile-ui.ts index 98a087aeb..804c21b86 100644 --- a/src/state/models/profile-ui.ts +++ b/src/state/models/profile-ui.ts @@ -1,7 +1,7 @@ import {makeAutoObservable} from 'mobx' import {RootStoreModel} from './root-store' import {ProfileViewModel} from './profile-view' -import {FeedViewModel} from './feed-view' +import {FeedModel} from './feed-view' import {BadgesViewModel} from './badges-view' export const SECTION_IDS = { @@ -19,7 +19,7 @@ export class ProfileUiModel { // data profile: ProfileViewModel - feed: FeedViewModel + feed: FeedModel badges: BadgesViewModel // ui state @@ -38,11 +38,14 @@ export class ProfileUiModel { {autoBind: true}, ) this.profile = new ProfileViewModel(rootStore, {user: params.user}) - this.feed = new FeedViewModel(rootStore, {author: params.user, limit: 10}) + this.feed = new FeedModel(rootStore, 'author', { + author: params.user, + limit: 10, + }) this.badges = new BadgesViewModel(rootStore) } - get currentView(): FeedViewModel | BadgesViewModel { + get currentView(): FeedModel | BadgesViewModel { if (this.selectedViewIndex === SECTION_IDS.POSTS) { return this.feed } |