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 })) {
|
if (statusType(status) === 'status' && find(status.attentions, { id: user.id })) {
|
||||||
const mentions = state.timelines.mentions
|
const mentions = state.timelines.mentions
|
||||||
|
|
||||||
mergeOrAdd(mentions.statuses, status)
|
// Add the mention to the mentions timeline
|
||||||
mentions.newStatusCount += 1
|
if (timelineObject !== mentions) {
|
||||||
|
mergeOrAdd(mentions.statuses, status)
|
||||||
|
mentions.newStatusCount += 1
|
||||||
|
|
||||||
sortTimeline(mentions)
|
sortTimeline(mentions)
|
||||||
|
}
|
||||||
|
|
||||||
addNotification({ type: 'mention', status, action: status })
|
addNotification({ type: 'mention', status, action: status })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue