forked from AkkomaGang/akkoma-fe
Only add mentions to the mentions timeline once.
This commit is contained in:
parent
58ac8f51a2
commit
917917596f
1 changed files with 6 additions and 3 deletions
|
@ -138,10 +138,13 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
|||
if (statusType(status) === 'status' && find(status.attentions, { id: user.id })) {
|
||||
const mentions = state.timelines.mentions
|
||||
|
||||
// Add the mention to the mentions timeline
|
||||
if (timelineObject !== mentions) {
|
||||
mergeOrAdd(mentions.statuses, status)
|
||||
mentions.newStatusCount += 1
|
||||
|
||||
sortTimeline(mentions)
|
||||
}
|
||||
|
||||
addNotification({ type: 'mention', status, action: status })
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue