mirror of
https://github.com/zedeus/nitter
synced 2026-09-05 22:59:31 +00:00
Minor retweet refactor
This commit is contained in:
parent
9b07199901
commit
c60280415e
4 changed files with 12 additions and 7 deletions
|
|
@ -3,9 +3,9 @@
|
|||
#import ../types, ../formatters, ../utils
|
||||
#
|
||||
#proc renderHeading(tweet: Tweet): string =
|
||||
#if tweet.retweetBy.isSome:
|
||||
#if tweet.retweet.isSome:
|
||||
<div class="retweet">
|
||||
<span>🔄 ${tweet.retweetBy.get()} retweeted</span>
|
||||
<span>🔄 ${get(tweet.retweet).by} retweeted</span>
|
||||
</div>
|
||||
#end if
|
||||
#if tweet.pinned:
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
#
|
||||
#for tweet in timeline.tweets:
|
||||
#if tweet.id in retweets: continue
|
||||
#elif tweet.retweetBy.isSome: retweets.add tweet.id
|
||||
#elif tweet.retweet.isSome: retweets.add tweet.id
|
||||
#end if
|
||||
${renderTweet(tweet, "timeline-tweet")}
|
||||
#end for
|
||||
|
|
|
|||
Loading…
Reference in a new issue