diff options
author | mousebot <mousebot@riseup.net> | 2022-03-11 12:50:55 +0100 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2022-03-11 12:54:42 +0100 |
commit | 5239dc08a361c98a484447b2848c4b2997e072c6 (patch) | |
tree | 9146a14919b31f35064c94b0afc5224ba3f0e2fa /lisp | |
parent | bd9710c355093259ec8a8cad8572a2b387aa631a (diff) |
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
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-media.el | 4 |
1 files changed, 3 insertions, 1 deletions
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"))) " "))) |