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

Merge branch 'fix/dont-show-rts-more-than-once' into 'develop'

Don't show repeats that have been shown already.

See merge request pleroma/pleroma-fe!143
parents bbd80c54 d2ef1451
No related branches found
No related tags found
No related merge requests found
......@@ -271,8 +271,14 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
let retweet
// If the retweeted status is already there, don't add the retweet
// to the timeline.
if (timeline && find(timelineObject.statuses, {id: retweetedStatus.id})) {
// Already have it visible, don't add to timeline, don't show.
if (timeline && find(timelineObject.statuses, (s) => {
if (s.retweeted_status) {
return s.id === retweetedStatus.id || s.retweeted_status.id === retweetedStatus.id
} else {
return s.id === retweetedStatus.id
}
})) {
// Already have it visible (either as the original or another RT), don't add to timeline, don't show.
retweet = addStatus(status, false, false)
} else {
retweet = addStatus(status, showImmediately)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment