Fix: remove replies to deleted and blocked posts from feeds (#2130)
parent
972bc1bd88
commit
aeafa3a8cd
|
@ -146,6 +146,19 @@ export class FeedTuner {
|
|||
): FeedViewPostsSlice[] {
|
||||
let slices: FeedViewPostsSlice[] = []
|
||||
|
||||
// remove posts that are replies, but which don't have the parent
|
||||
// hydrated. this means the parent was either deleted or blocked
|
||||
feed = feed.filter(item => {
|
||||
if (
|
||||
AppBskyFeedPost.isRecord(item.post.record) &&
|
||||
item.post.record.reply &&
|
||||
!item.reply
|
||||
) {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
})
|
||||
|
||||
if (maintainOrder) {
|
||||
slices = feed.map(
|
||||
item => new FeedViewPostsSlice([item], `slice-${this.keyCounter++}`),
|
||||
|
|
Loading…
Reference in New Issue