mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-13 03:26:30 +00:00
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()
|
renderNoneFound()
|
||||||
else:
|
else:
|
||||||
var threads: seq[string]
|
var threads: seq[string]
|
||||||
|
var retweets: seq[string]
|
||||||
for tweet in results.content:
|
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))
|
let thread = results.content.filterIt(threadFilter(it, tweet.threadId))
|
||||||
if thread.len < 2:
|
if thread.len < 2:
|
||||||
|
if tweet.retweet.isSome:
|
||||||
|
retweets &= tweet.id
|
||||||
renderTweet(tweet, prefs, path, showThread=tweet.hasThread)
|
renderTweet(tweet, prefs, path, showThread=tweet.hasThread)
|
||||||
else:
|
else:
|
||||||
renderThread(thread, prefs, path)
|
renderThread(thread, prefs, path)
|
||||||
|
|
Loading…
Reference in a new issue