Only add mentions to the mentions timeline once.
This commit is contained in:
parent
58ac8f51a2
commit
917917596f
|
@ -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
|
||||||
|
|
||||||
|
// Add the mention to the mentions timeline
|
||||||
|
if (timelineObject !== mentions) {
|
||||||
mergeOrAdd(mentions.statuses, status)
|
mergeOrAdd(mentions.statuses, status)
|
||||||
mentions.newStatusCount += 1
|
mentions.newStatusCount += 1
|
||||||
|
|
||||||
sortTimeline(mentions)
|
sortTimeline(mentions)
|
||||||
|
}
|
||||||
|
|
||||||
addNotification({ type: 'mention', status, action: status })
|
addNotification({ type: 'mention', status, action: status })
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue