From 9f9fccb70b884cc2ecf20ccb748608dbe39aafb9 Mon Sep 17 00:00:00 2001 From: Zed Date: Sun, 29 Mar 2020 08:05:09 +0200 Subject: [PATCH] Display "GIF" below gifs Fixes #141 --- src/views/tweet.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/tweet.nim b/src/views/tweet.nim index 8843827..6b8d2a6 100644 --- a/src/views/tweet.nim +++ b/src/views/tweet.nim @@ -115,7 +115,7 @@ proc renderGif(gif: Gif; prefs: Prefs): VNode = let thumb = getPicUrl(gif.thumb) let url = getGifUrl(gif.url) if prefs.autoplayGifs: - video(class="gif", poster=thumb, autoplay="", muted="", loop=""): + video(class="gif", poster=thumb, controls="", autoplay="", muted="", loop=""): source(src=url, `type`="video/mp4") else: video(class="gif", poster=thumb, controls="", muted="", loop=""): @@ -300,6 +300,7 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class=""; views = tweet.video.get().views elif tweet.gif.isSome: renderGif(tweet.gif.get(), prefs) + views = "GIF" elif tweet.poll.isSome: renderPoll(tweet.poll.get())