diff options
author | mousebot <mousebot@riseup.net> | 2021-09-13 21:58:11 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-09-13 21:58:11 +0200 |
commit | a2cf6af06ab076dfcc9b032220259574ed3fcd9a (patch) | |
tree | 97b9f1fc3c6a719ff97a207311561c5fb27746d5 /lisp/mastodon-tl.el | |
parent | 14842fce7caa96c0f6234308c85a82a8e556f18f (diff) |
make display of (scaled) avatars a customize option
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r-- | lisp/mastodon-tl.el | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index a6f3f9a..c5240db 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -82,11 +82,16 @@ width fonts when rendering HTML text")) "A unique identifier and functions for each Mastodon buffer.") (make-variable-buffer-local 'mastodon-tl--buffer-spec) -(defvar mastodon-tl--show-avatars-p - (if (version< emacs-version "27.1") - (image-type-available-p 'imagemagick) - (image-transforms-p)) - "A boolean value stating whether to show avatars in timelines.") +(defcustom mastodon-tl--show-avatars-p t + "Whether to enable display of user avatars in timelines." + :group 'mastodon-tl + :type '(boolean :tag "Whether to display user avatars in timelines")) + +;; (defvar mastodon-tl--show-avatars-p nil + ;; (if (version< emacs-version "27.1") + ;; (image-type-available-p 'imagemagick) + ;; (image-transforms-p)) + ;; "A boolean value stating whether to show avatars in timelines.") (defvar mastodon-tl--update-point nil "When updating a mastodon buffer this is where new toots will be inserted. @@ -267,7 +272,11 @@ Optionally start from POS." ;; TODO: Once we have a view for a user (e.g. their posts ;; timeline) make this a tab-stop and attach an action (concat - (when (and mastodon-tl--show-avatars-p mastodon-tl--display-media-p) + (when (and mastodon-tl--show-avatars-p + mastodon-tl--display-media-p + (if (version< emacs-version "27.1") + (image-type-available-p 'imagemagick) + (image-transforms-p))) (mastodon-media--get-avatar-rendering avatar-url)) (propertize name 'face 'mastodon-display-name-face) " (" |