forked from AkkomaGang/akkoma-fe
Don't show repeats that have been shown already.
This commit is contained in:
parent
bbd80c54bf
commit
d2ef145115
1 changed files with 8 additions and 2 deletions
|
@ -271,8 +271,14 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us
|
||||||
let retweet
|
let retweet
|
||||||
// If the retweeted status is already there, don't add the retweet
|
// If the retweeted status is already there, don't add the retweet
|
||||||
// to the timeline.
|
// to the timeline.
|
||||||
if (timeline && find(timelineObject.statuses, {id: retweetedStatus.id})) {
|
if (timeline && find(timelineObject.statuses, (s) => {
|
||||||
// Already have it visible, don't add to timeline, don't show.
|
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)
|
retweet = addStatus(status, false, false)
|
||||||
} else {
|
} else {
|
||||||
retweet = addStatus(status, showImmediately)
|
retweet = addStatus(status, showImmediately)
|
||||||
|
|
Loading…
Reference in a new issue