Fix missing "Show thread" links

This commit is contained in:
Zed
2019-09-19 03:51:15 +02:00
parent 10bcf99205
commit 19659de410
3 changed files with 6 additions and 4 deletions

View File

@@ -222,7 +222,7 @@ proc renderQuote(quote: Quote; prefs: Prefs): VNode =
text "Show this thread"
proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class="";
index=0; total=(-1); last=false): VNode =
index=0; total=(-1); last=false; showThread=false): VNode =
var divClass = class
if index == total or last:
divClass = "thread-last " & class
@@ -265,6 +265,6 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class="";
if not prefs.hideTweetStats:
renderStats(tweet.stats, views)
if tweet.hasThread and "timeline" in class:
if showThread:
a(class="show-thread", href=getLink(tweet)):
text "Show this thread"