diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/api/feed-manip.ts | 27 | ||||
-rw-r--r-- | src/lib/statsig/gates.ts | 1 |
2 files changed, 6 insertions, 22 deletions
diff --git a/src/lib/api/feed-manip.ts b/src/lib/api/feed-manip.ts index eaa760b4b..0eca8b165 100644 --- a/src/lib/api/feed-manip.ts +++ b/src/lib/api/feed-manip.ts @@ -379,7 +379,11 @@ export class FeedTuner { ): FeedViewPostsSlice[] => { for (let i = 0; i < slices.length; i++) { const slice = slices[i] - if (slice.isReply && !shouldDisplayReplyInFollowing(slice, userDid)) { + if ( + slice.isReply && + !slice.isRepost && + !shouldDisplayReplyInFollowing(slice.getAuthors(), userDid) + ) { slices.splice(i, 1) i-- } @@ -443,13 +447,9 @@ function areSameAuthor(authors: AuthorContext): boolean { } function shouldDisplayReplyInFollowing( - slice: FeedViewPostsSlice, + authors: AuthorContext, userDid: string, ): boolean { - if (slice.isRepost) { - return true - } - const authors = slice.getAuthors() const {author, parentAuthor, grandparentAuthor, rootAuthor} = authors if (!isSelfOrFollowing(author, userDid)) { // Only show replies from self or people you follow. @@ -463,21 +463,6 @@ function shouldDisplayReplyInFollowing( // Always show self-threads. return true } - if ( - parentAuthor && - parentAuthor.did !== author.did && - rootAuthor && - rootAuthor.did === author.did && - slice.items.length > 2 - ) { - // If you follow A, show A -> someone[>0 likes] -> A chains too. - // This is different from cases below because you only know one person. - const parentPost = slice.items[1].post - const parentLikeCount = parentPost.likeCount ?? 0 - if (parentLikeCount > 0) { - return true - } - } // From this point on we need at least one more reason to show it. if ( parentAuthor && diff --git a/src/lib/statsig/gates.ts b/src/lib/statsig/gates.ts index 9b6c036b9..909b93e6b 100644 --- a/src/lib/statsig/gates.ts +++ b/src/lib/statsig/gates.ts @@ -3,4 +3,3 @@ export type Gate = | 'debug_show_feedcontext' | 'suggested_feeds_interstitial' | 'ten_million_dialog' - | 'video_upload' // upload videos |