aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el29
-rw-r--r--lisp/mastodon-toot.el2
2 files changed, 22 insertions, 9 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 46ec8fe..e65d3a5 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -600,9 +600,6 @@ this just means displaying toot client."
(faved (equal 't (mastodon-tl--field 'favourited toot)))
(boosted (equal 't (mastodon-tl--field 'reblogged toot)))
(bookmarked (equal 't (mastodon-tl--field 'bookmarked toot)))
- (bookmark-str (if (fontp (char-displayable-p #10r128278))
- "🔖"
- "K"))
(visibility (mastodon-tl--field 'visibility toot))
(account (alist-get 'account toot))
(avatar-url (alist-get 'avatar account))
@@ -617,12 +614,14 @@ this just means displaying toot client."
;; displayed for an already boosted/favourited toot or as the result of
;; the toot having just been favourited/boosted.
(concat (when boosted
- (mastodon-tl--format-faved-or-boosted-byline "B"))
+ (mastodon-tl--format-faved-or-boosted-byline
+ (mastodon-tl--return-boost-char)))
(when faved
(mastodon-tl--format-faved-or-boosted-byline
(mastodon-tl--return-fave-char)))
(when bookmarked
- (mastodon-tl--format-faved-or-boosted-byline bookmark-str)))
+ (mastodon-tl--format-faved-or-boosted-byline
+ (mastodon-tl--return-bookmark-char))))
;; we remove avatars from the byline also, so that they also do not mess
;; with `mastodon-tl--goto-next-toot':
(when (and mastodon-tl--show-avatars
@@ -667,10 +666,10 @@ this just means displaying toot client."
'face 'mastodon-display-name-face
'follow-link t
'mouse-face 'highlight
- 'mastodon-tab-stop 'shr-url
- 'shr-url app-url
+ 'mastodon-tab-stop 'shr-url
+ 'shr-url app-url
'help-echo app-url
- 'keymap mastodon-tl--shr-map-replacement)))))
+ 'keymap mastodon-tl--shr-map-replacement)))))
(if edited-time
(concat
(if (fontp (char-displayable-p #10r128274))
@@ -694,6 +693,14 @@ this just means displaying toot client."
(mastodon-toot--get-toot-edits (alist-get 'id toot)))
'byline t))))
+(defun mastodon-tl--return-boost-char ()
+ ""
+ (cond
+ ((fontp (char-displayable-p #10r128257))
+ "🔁")
+ (t
+ "B")))
+
(defun mastodon-tl--return-fave-char ()
""
(cond
@@ -704,6 +711,12 @@ this just means displaying toot client."
(t
"F")))
+(defun mastodon-tl--return-bookmark-char ()
+ ""
+ (if (fontp (char-displayable-p #10r128278))
+ "🔖"
+ "K"))
+
(defun mastodon-tl--format-edit-timestamp (timestamp)
"Convert edit TIMESTAMP into a descriptive string."
(let ((parsed (ts-human-duration
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 4f9fb1b..7211183 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -334,7 +334,7 @@ TYPE is a symbol, either 'favourite or 'boost."
(list 'favourited-p (not faved))))
(mastodon-toot--action-success
(if boost-p
- "B"
+ (mastodon-tl--return-boost-char)
(mastodon-tl--return-fave-char))
byline-region remove))
(message (format "%s #%s" (if boost-p msg action) id))))))