diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-08-08 11:05:05 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-08-08 11:05:05 +0200 |
commit | 881ee6ab4133e63c4debc1b6e716d5e4bdb446aa (patch) | |
tree | 3551b49a1185f755ff410525d733725e37d2eb23 /lisp/mastodon-media.el | |
parent | 21090d643515ad076c9900d601a1a901f464ccc9 (diff) |
factor out image-trans-check.
Diffstat (limited to 'lisp/mastodon-media.el')
-rw-r--r-- | lisp/mastodon-media.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/mastodon-media.el b/lisp/mastodon-media.el index 8c035be..570be02 100644 --- a/lisp/mastodon-media.el +++ b/lisp/mastodon-media.el @@ -363,15 +363,14 @@ MEDIA-TYPE is a symbol and either `avatar' or `media-link'. START is the position where we start loading the image. REGION-LENGTH is the range from start to propertize." (let ((image-options - (when (or (image-type-available-p 'imagemagick) - (image-transforms-p)) ; inbuilt scaling in 27.1 + (when (mastodon-tl--image-trans-check) (cond ((eq media-type 'avatar) `(:height ,mastodon-media--avatar-height)) ((eq media-type 'media-link) `(:max-height ,mastodon-media--preview-max-height))))) (buffer (current-buffer)) (marker (copy-marker start)) - (url-show-status nil)) ; stop url.el from spamming us about connecting + (url-show-status nil)) ; stop url.el from spamming us about connecting (condition-case nil ;; catch errors in url-retrieve to not break our caller (if (and mastodon-media--enable-image-caching @@ -469,8 +468,7 @@ START and END are the beginning and end of the media item to overlay." ;; We use just an empty space as the textual representation. ;; This is what a user will see on a non-graphical display ;; where not showing an avatar at all is preferable. - (let ((image-options (when (or (image-type-available-p 'imagemagick) - (image-transforms-p)) ; inbuilt scaling in 27.1 + (let ((image-options (when (mastodon-tl--image-trans-check) `(:height ,mastodon-media--avatar-height)))) (concat (propertize " " |