Hide tweets if they were retweeted on same page
This commit is contained in:
parent
1a356bc51d
commit
7a7c4d68e4
1 changed files with 4 additions and 1 deletions
|
@ -80,10 +80,13 @@ proc renderTimelineTweets*(results: Result[Tweet]; prefs: Prefs; path: string):
|
|||
renderNoneFound()
|
||||
else:
|
||||
var threads: seq[string]
|
||||
var retweets: seq[string]
|
||||
for tweet in results.content:
|
||||
if tweet.threadId in threads: continue
|
||||
if tweet.threadId in threads or tweet.id in retweets: continue
|
||||
let thread = results.content.filterIt(threadFilter(it, tweet.threadId))
|
||||
if thread.len < 2:
|
||||
if tweet.retweet.isSome:
|
||||
retweets &= tweet.id
|
||||
renderTweet(tweet, prefs, path, showThread=tweet.hasThread)
|
||||
else:
|
||||
renderThread(thread, prefs, path)
|
||||
|
|
Loading…
Reference in a new issue