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
committerJohnson Denen <johnson.denen@gmail.com>2017-05-15 09:38:29 -0400
commitc14e7dba65298506ffaa135b82b423ac7dd4d2e7 (patch)
tree2887cee54247566ab2167abd6a7f16378024f0ec /lisp/mastodon-tl.el
parent00af6decdce60bdfbd8a492f2266b6b785c664a3 (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)