diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-08-20 12:46:52 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-08-20 12:46:52 +0200 |
commit | 43baced1733b318a4fbe0a2ddba02c252f109c41 (patch) | |
tree | 7b0475d0d2f3e9b5164d10167a8372d8c95d9d38 /lisp/mastodon-tl.el | |
parent | b8838b8a2fb8932227c4daf2cf823ad9d0e1eea6 (diff) | |
parent | 7be929c123d8ce94934a8b6f7c214df1d0bc346f (diff) |
Merge branch 'develop'
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r-- | lisp/mastodon-tl.el | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 249c4a8..1d18b01 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -264,7 +264,7 @@ text, i.e. hidden spoiler text." "local" "timelines/public?local=true" 'mastodon-tl--timeline)) (defun mastodon-tl--get-tag-timeline () - "Prompts for tag and opens its timeline." + "Prompt for tag and opens its timeline." (interactive) (let* ((word (or (word-at-point) "")) (input (read-string (format "Load timeline for tag (%s): " word))) @@ -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,18 +545,23 @@ 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 + (if (fontp (char-displayable-p #10r128278)) + "🔖" + "K")))) (propertize (concat ;; we propertize help-echo format faves for author name ;; in `mastodon-tl--byline-author' (funcall author-byline toot) (cond ((equal visibility "direct") - (if (fontp (char-displayable-p #10r128274)) + (if (fontp (char-displayable-p #10r9993)) " ✉" " [direct]")) ((equal visibility "private") - (if (fontp (char-displayable-p #10r9993)) + (if (fontp (char-displayable-p #10r128274)) " 🔒" " [followers]"))) (funcall action-byline toot) @@ -575,9 +581,18 @@ 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 (or "🔖" "K")) + "bookmarked")))) + (format "(%s) " + (propertize letter 'face 'mastodon-boost-fave-face + ;; emojify breaks this for 🔖: + '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. |