Adds respots under the 'post' tab under profile (#158)

This commit is contained in:
Aryan Goharzad
2023-02-06 13:23:01 -05:00
committed by GitHub
parent bf7b961222
commit 8e91fc3279
3 changed files with 24 additions and 11 deletions
+13 -4
View File
@@ -229,13 +229,22 @@ export class FeedModel {
}
get nonReplyFeed() {
return this.feed.filter(
item =>
const nonReplyFeed = this.feed.filter(item => {
const params = this.params as GetAuthorFeed.QueryParams
const isRepost =
item.reply &&
(item?.reasonRepost?.by?.handle === params.author ||
item?.reasonRepost?.by?.did === params.author)
return (
!item.reply || // not a reply
isRepost ||
((item._isThreadParent || // but allow if it's a thread by the user
item._isThreadChild) &&
item.reply?.root.author.did === item.post.author.did),
)
item.reply?.root.author.did === item.post.author.did)
)
})
return nonReplyFeed
}
setHasNewLatest(v: boolean) {