Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix: remove duplicates in the TL caused by rendering reply parents

+27 -1
+25
src/state/models/feed-view.ts
··· 30 30 _isThreadParent: boolean = false 31 31 _isThreadChildElided: boolean = false 32 32 _isThreadChild: boolean = false 33 + _hideParent: boolean = true // used to avoid dup post rendering while showing some parents 33 34 34 35 // data 35 36 post: PostView ··· 463 464 } else { 464 465 this.feed = this.feed.concat(toAppend) 465 466 } 467 + dedupParents(this.feed) 466 468 }) 467 469 } 468 470 ··· 599 601 } 600 602 601 603 return reorg 604 + } 605 + 606 + function dedupParents(feed: FeedItemModel[]) { 607 + // only show parents that aren't already in the feed 608 + // NOTE if a parent post arrives in a followup loadmore, it'll show when we otherwise wish it wouldnt -prf 609 + for (let i = 0; i < feed.length; i++) { 610 + const item1 = feed[i] 611 + if (!item1.replyParent || item1._isThreadChild) { 612 + continue 613 + } 614 + let hideParent = false 615 + for (let j = 0; j < feed.length; j++) { 616 + const item2 = feed[j] 617 + if ( 618 + item1.replyParent.post.uri === item2.post.uri || // the post itself is there 619 + (j < i && item1.replyParent.post.uri === item2.replyParent?.post.uri) // another reply already showed it 620 + ) { 621 + hideParent = true 622 + break 623 + } 624 + } 625 + item1._hideParent = hideParent 626 + } 602 627 } 603 628 604 629 function getSelfReplyUri(item: FeedViewPost): string | undefined {
+2 -1
src/view/com/posts/FeedItem.tsx
··· 96 96 return <View /> 97 97 } 98 98 99 - const isChild = item._isThreadChild || (!item.reason && item.reply) 99 + const isChild = 100 + item._isThreadChild || (!item.reason && !item._hideParent && item.reply) 100 101 const isSmallTop = isChild && item._isThreadChild 101 102 const isNoTop = isChild && !item._isThreadChild 102 103 const outerStyles = [