From d2ef1451158fbde0d22160f873dad0bb0444d583 Mon Sep 17 00:00:00 2001 From: shpuld Date: Thu, 9 Nov 2017 08:36:11 +0200 Subject: [PATCH] Don't show repeats that have been shown already. --- src/modules/statuses.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 1cafa419..5f2f8152 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -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)