From 2f68bc776d69638eb4d83ad06a4bc3313c0e83e2 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 22 Dec 2023 15:50:57 +0100 Subject: tl--content: only call tl--media if we have media --- lisp/mastodon-tl.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index ca09a0f..a8a1264 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1308,11 +1308,13 @@ in which case play first video or gif from current toot." "Retrieve text content from TOOT. Runs `mastodon-tl--render-text' and fetches poll or media." (let* ((content (mastodon-tl--field 'content toot)) - (poll-p (mastodon-tl--field 'poll toot))) + (poll-p (mastodon-tl--field 'poll toot)) + (media-p (mastodon-tl--field 'media_attachments toot))) (concat (mastodon-tl--render-text content toot) (when poll-p (mastodon-tl--get-poll toot)) - (mastodon-tl--media toot)))) + (when media-p + (mastodon-tl--media toot))))) (defun mastodon-tl--prev-item-id () "Return the id of the last toot inserted into the buffer." -- cgit v1.2.3