forked from AkkomaGang/akkoma-fe
made the code responsible for showing unwritten mentions actually work
This commit is contained in:
parent
2cfff1b8b9
commit
2182af4058
1 changed files with 11 additions and 8 deletions
|
@ -176,15 +176,18 @@ const Status = {
|
||||||
userId: attn.id
|
userId: attn.id
|
||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
alsoMentions () {
|
|
||||||
if (!this.headTailLinks) return []
|
|
||||||
const set = new Set(this.headTailLinks.writtenMentions.map(m => m.url))
|
|
||||||
return this.headTailLinks.writtenMentions.filter(mention => {
|
|
||||||
return !set.has(mention.url)
|
|
||||||
})
|
|
||||||
},
|
|
||||||
mentionsLine () {
|
mentionsLine () {
|
||||||
return this.alsoMentions
|
const writtenMentions = this.headTailLinks ? this.headTailLinks.writtenMentions : []
|
||||||
|
const set = new Set(writtenMentions.map(_ => _.url))
|
||||||
|
return this.status.attentions.filter(attn => {
|
||||||
|
return attn.screen_name !== this.replyToName &&
|
||||||
|
attn.screen_name !== this.status.user.screen_name &&
|
||||||
|
!set.has(attn.url)
|
||||||
|
}).map(attn => ({
|
||||||
|
url: attn.statusnet_profile_url,
|
||||||
|
content: attn.screen_name,
|
||||||
|
userId: attn.id
|
||||||
|
}))
|
||||||
},
|
},
|
||||||
hasMentionsLine () {
|
hasMentionsLine () {
|
||||||
return this.mentionsLine.length > 0
|
return this.mentionsLine.length > 0
|
||||||
|
|
Loading…
Reference in a new issue