Show reasons for tweets being withheld

Fixes #33
This commit is contained in:
Zed
2019-09-08 14:34:26 +02:00
parent 8208676e6e
commit 9ff3ba2005
5 changed files with 30 additions and 7 deletions

View File

@@ -191,7 +191,10 @@ proc renderQuote(quote: Quote; prefs: Prefs): VNode =
if not quote.available:
return buildHtml(tdiv(class="quote unavailable")):
tdiv(class="unavailable-quote"):
text "This tweet is unavailable"
if quote.tombstone.len > 0:
text quote.tombstone
else:
text "This tweet is unavailable"
buildHtml(tdiv(class="quote")):
a(class="quote-link", href=getLink(quote))
@@ -223,7 +226,10 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class="";
return buildHtml(tdiv(class=divClass)):
tdiv(class="status-el unavailable"):
tdiv(class="unavailable-box"):
text "This tweet is unavailable"
if tweet.tombstone.len > 0:
text tweet.tombstone
else:
text "This tweet is unavailable"
buildHtml(tdiv(class=divClass)):
tdiv(class="status-el"):