mirror of
https://git.youjo.love/youjo/youjo-fe.git
synced 2024-11-20 13:59:55 +01:00
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 })) {
|
||||
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 })
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue