Skip to content
Snippets Groups Projects
Commit 91791759 authored by lain's avatar lain
Browse files

Only add mentions to the mentions timeline once.

parent 58ac8f51
Branches
No related tags found
No related merge requests found
......@@ -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
mergeOrAdd(mentions.statuses, status)
mentions.newStatusCount += 1
// Add the mention to the mentions timeline
if (timelineObject !== mentions) {
mergeOrAdd(mentions.statuses, status)
mentions.newStatusCount += 1
sortTimeline(mentions)
sortTimeline(mentions)
}
addNotification({ type: 'mention', status, action: status })
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment