aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authorHolger Dürer <me@hdurer.net>2017-05-08 22:17:39 +0100
committerHolger Dürer <me@hdurer.net>2017-05-10 21:26:08 +0100
commitb20265eea37884bde663aa6d1d498c9180b89947 (patch)
tree2887cee54247566ab2167abd6a7f16378024f0ec /lisp/mastodon-tl.el
parent0fc0d53dee2513b5923553531a8b6a9c5db10975 (diff)
Move the rendering of images fully into mastodon-media.el and use default images.
Having all the logic in one file reduces interdependencies. Having default images is more pleasing during the incremental loading.
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el15
1 files changed, 2 insertions, 13 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 1a5d9ae..b3550c6 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -108,14 +108,7 @@ Optionally start from POS."
(avatar-url (cdr (assoc 'avatar account))))
(concat
(when mastodon-media-show-avatars-p
- ;; 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.
- (concat (propertize " "
- 'media-url avatar-url
- 'media-state 'needs-loading
- 'media-type 'avatar)
- " "))
+ (mastodon-media--get-avatar-rendering avatar-url))
(propertize name 'face 'warning)
" (@"
handle
@@ -191,11 +184,7 @@ also render the html"
(mapconcat
(lambda (media-attachement)
(let ((preview-url (cdr (assoc 'preview_url media-attachement))))
- (concat (propertize "[img]"
- 'media-url preview-url
- 'media-state 'needs-loading
- 'media-type 'media-link)
- " ")))
+ (mastodon-media--get-media-link-rendering preview-url)))
media-attachements "")))
(defun mastodon-tl--content (toot)