···379379 ): FeedViewPostsSlice[] => {
380380 for (let i = 0; i < slices.length; i++) {
381381 const slice = slices[i]
382382- if (slice.isReply && !shouldDisplayReplyInFollowing(slice, userDid)) {
382382+ if (
383383+ slice.isReply &&
384384+ !slice.isRepost &&
385385+ !shouldDisplayReplyInFollowing(slice.getAuthors(), userDid)
386386+ ) {
383387 slices.splice(i, 1)
384388 i--
385389 }
···443447}
444448445449function shouldDisplayReplyInFollowing(
446446- slice: FeedViewPostsSlice,
450450+ authors: AuthorContext,
447451 userDid: string,
448452): boolean {
449449- if (slice.isRepost) {
450450- return true
451451- }
452452- const authors = slice.getAuthors()
453453 const {author, parentAuthor, grandparentAuthor, rootAuthor} = authors
454454 if (!isSelfOrFollowing(author, userDid)) {
455455 // Only show replies from self or people you follow.
···462462 ) {
463463 // Always show self-threads.
464464 return true
465465- }
466466- if (
467467- parentAuthor &&
468468- parentAuthor.did !== author.did &&
469469- rootAuthor &&
470470- rootAuthor.did === author.did &&
471471- slice.items.length > 2
472472- ) {
473473- // If you follow A, show A -> someone[>0 likes] -> A chains too.
474474- // This is different from cases below because you only know one person.
475475- const parentPost = slice.items[1].post
476476- const parentLikeCount = parentPost.likeCount ?? 0
477477- if (parentLikeCount > 0) {
478478- return true
479479- }
480465 }
481466 // From this point on we need at least one more reason to show it.
482467 if (