Only add mentions to the mentions timeline once.

This commit is contained in:
Roger Braun 2016-12-03 12:48:37 +01:00
parent 58ac8f51a2
commit 917917596f

View file

@ -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 })
} }