diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/state/models/feed-view.ts | 4 | ||||
-rw-r--r-- | src/state/models/profile-ui.ts | 8 | ||||
-rw-r--r-- | src/view/screens/Profile.tsx | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/state/models/feed-view.ts b/src/state/models/feed-view.ts index 202476fa3..7b27b239b 100644 --- a/src/state/models/feed-view.ts +++ b/src/state/models/feed-view.ts @@ -196,6 +196,10 @@ export class FeedModel { return this.hasLoaded && !this.hasContent } + get nonReplyFeed() { + return this.feed.filter(post => !post.record.reply) + } + setHasNewLatest(v: boolean) { this.hasNewLatest = v } diff --git a/src/state/models/profile-ui.ts b/src/state/models/profile-ui.ts index 0a70525fa..d0eb1f858 100644 --- a/src/state/models/profile-ui.ts +++ b/src/state/models/profile-ui.ts @@ -7,12 +7,17 @@ import {FeedModel} from './feed-view' export enum Sections { Posts = 'Posts', + PostsWithReplies = 'Posts & replies', Scenes = 'Scenes', Trending = 'Trending', Members = 'Members', } -const USER_SELECTOR_ITEMS = [Sections.Posts, Sections.Scenes] +const USER_SELECTOR_ITEMS = [ + Sections.Posts, + Sections.PostsWithReplies, + Sections.Scenes, +] const SCENE_SELECTOR_ITEMS = [Sections.Trending, Sections.Members] export interface ProfileUiParams { @@ -53,6 +58,7 @@ export class ProfileUiModel { get currentView(): FeedModel | MembershipsViewModel | MembersViewModel { if ( this.selectedView === Sections.Posts || + this.selectedView === Sections.PostsWithReplies || this.selectedView === Sections.Trending ) { return this.feed diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index 1187e626e..d1abcd731 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -121,10 +121,15 @@ export const Profile = observer(({navIdx, visible, params}: ScreenParams) => { } else { if ( uiState.selectedView === Sections.Posts || + uiState.selectedView === Sections.PostsWithReplies || uiState.selectedView === Sections.Trending ) { if (uiState.feed.hasContent) { - items = uiState.feed.feed.slice() + if (uiState.selectedView === Sections.Posts) { + items = uiState.feed.nonReplyFeed + } else { + items = uiState.feed.feed.slice() + } if (!uiState.feed.hasMore) { items.push(END_ITEM) } |