aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el19
1 files changed, 15 insertions, 4 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 0d666ed..4330084 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -532,6 +532,7 @@ By default it is `mastodon-tl--byline-boosted'"
(parsed-time (date-to-time created-time))
(faved (equal 't (mastodon-tl--field 'favourited toot)))
(boosted (equal 't (mastodon-tl--field 'reblogged toot)))
+ (bookmarked (equal 't (mastodon-tl--field 'bookmarked toot)))
(visibility (mastodon-tl--field 'visibility toot)))
(concat
;; Boosted/favourited markers are not technically part of the byline, so
@@ -544,7 +545,9 @@ By default it is `mastodon-tl--byline-boosted'"
(concat (when boosted
(mastodon-tl--format-faved-or-boosted-byline "B"))
(when faved
- (mastodon-tl--format-faved-or-boosted-byline "F")))
+ (mastodon-tl--format-faved-or-boosted-byline "F"))
+ (when bookmarked
+ (mastodon-tl--format-faved-or-boosted-byline "K")))
(propertize
(concat
;; we propertize help-echo format faves for author name
@@ -575,9 +578,17 @@ By default it is `mastodon-tl--byline-boosted'"
(defun mastodon-tl--format-faved-or-boosted-byline (letter)
"Format the byline marker for a boosted or favourited status.
-LETTER is a string, either F or B."
- (format "(%s) "
- (propertize letter 'face 'mastodon-boost-fave-face)))
+LETTER is a string, F for favourited, B for boosted, or K for bookmarked."
+ (let ((help-string (cond ((equal letter "F")
+ "favourited")
+ ((equal letter "B")
+ "boosted")
+ ((equal letter "K")
+ "bookmarked"))))
+ (format "(%s) "
+ (propertize letter 'face 'mastodon-boost-fave-face
+ 'help-echo (format "You have %s this status."
+ help-string)))))
(defun mastodon-tl--render-text (string toot)
"Return a propertized text rendering the given HTML string STRING.