From 5239dc08a361c98a484447b2848c4b2997e072c6 Mon Sep 17 00:00:00 2001 From: mousebot Date: Fri, 11 Mar 2022 12:50:55 +0100 Subject: don't add play with mpv help-echo if media type is "unknown" "unknown" type is given when a media image fails to load or similar. nil is e.g. when a profile picture isn't given, and missing.png is used as a replacement --- lisp/mastodon-media.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon-media.el') diff --git a/lisp/mastodon-media.el b/lisp/mastodon-media.el index f79b1fa..383e062 100644 --- a/lisp/mastodon-media.el +++ b/lisp/mastodon-media.el @@ -328,7 +328,9 @@ TYPE is the attachment's type field on the server." 'mastodon-tab-stop 'image ; for do-link-action-at-point 'image-url full-remote-url ; for shr-browse-image 'keymap mastodon-tl--shr-image-map-replacement - 'help-echo (if (string= type "image") + 'help-echo (if (or (string= type "image") + (string= type nil) + (string= type "unknown")) ;handle borked images help-echo (concat help-echo "\nC-RET: play " type " with mpv"))) " "))) -- cgit v1.2.3