From 917917596fe7c9185590bf3c6cc267a0d6a89e5a Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Sat, 3 Dec 2016 12:48:37 +0100 Subject: [PATCH] Only add mentions to the mentions timeline once. --- src/modules/statuses.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index f58b763a..f4bffebf 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -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 }) }