From f70edb1fae46afe8c26dd13020a3c67bd1b46f29 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 10 Aug 2022 14:57:19 +0200 Subject: fix formatting of unmute-user --- lisp/mastodon-tl.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 7aef0a1..4014772 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1444,7 +1444,8 @@ by `mastodon-tl--follow-user' to enable or disable notifications." ((string-equal notify "false") (message "Not receiving notifications for user %s (@%s)!" name user-handle)) - ((string-equal action "mute") + ((or (string-equal action "mute") + (string-equal action "unmute")) (message "User %s (@%s) %sd!" name user-handle action)) ((eq notify nil) (message "User %s (@%s) %sed!" name user-handle action))))))) -- cgit v1.2.3 From 6c04327b6c89529a19f196f2610ad86779ab8232 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 19 Aug 2022 09:21:39 +0200 Subject: tl--init*: fix a stray bracket --- lisp/mastodon-tl.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 4014772..0d666ed 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1688,14 +1688,13 @@ JSON is the data returned from the server." #'mastodon-tl--update-timestamps-callback (current-buffer) nil))) - (unless - ;; for everything save profiles: - (string-prefix-p "accounts" endpoint)) - ;;(or (equal endpoint "notifications") - ;; (string-prefix-p "timelines" endpoint) - ;; (string-prefix-p "favourites" endpoint) - ;; (string-prefix-p "statuses" endpoint)) - (mastodon-tl--goto-first-item))) + (unless (string-prefix-p "accounts" endpoint) + ;; for everything save profiles + (mastodon-tl--goto-first-item)))) +;;(or (equal endpoint "notifications") +;; (string-prefix-p "timelines" endpoint) +;; (string-prefix-p "favourites" endpoint) +;; (string-prefix-p "statuses" endpoint)) (defun mastodon-tl--init-sync (buffer-name endpoint update-function) "Initialize BUFFER-NAME with timeline targeted by ENDPOINT. -- cgit v1.2.3 From b058512c3e437ec9334b59645d9c625528e40996 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 19 Aug 2022 09:35:44 +0200 Subject: format for bookmarked toots, help-echo for B/F/K format chars --- lisp/mastodon-tl.el | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'lisp/mastodon-tl.el') 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. -- cgit v1.2.3 From 4b39459c720f2ed8efe54efa23f1a92613bbe34e Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 19 Aug 2022 09:23:59 +0200 Subject: docstring --- lisp/mastodon-tl.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 4330084..638f01a 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))) -- cgit v1.2.3 From ea6e9675bdfffb682f2210312eea22d7d4c0a92f Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 19 Aug 2022 10:18:16 +0200 Subject: FIX the post visibility marker displayable check --- lisp/mastodon-tl.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 638f01a..168523b 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -554,11 +554,11 @@ By default it is `mastodon-tl--byline-boosted'" ;; 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) -- cgit v1.2.3 From 05c42b95f48d57ac0d06a9a5c4cd910db77f073b Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 19 Aug 2022 10:19:05 +0200 Subject: use bookmark emoji if possible --- lisp/mastodon-tl.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 168523b..d955a5e 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -547,7 +547,10 @@ By default it is `mastodon-tl--byline-boosted'" (when faved (mastodon-tl--format-faved-or-boosted-byline "F")) (when bookmarked - (mastodon-tl--format-faved-or-boosted-byline "K"))) + (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 @@ -583,7 +586,7 @@ LETTER is a string, F for favourited, B for boosted, or K for bookmarked." "favourited") ((equal letter "B") "boosted") - ((equal letter "K") + ((equal letter (or "🔖" "K")) "bookmarked")))) (format "(%s) " (propertize letter 'face 'mastodon-boost-fave-face -- cgit v1.2.3 From 0e297693434939a70e1d323a4b6880c0ff5e7527 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 19 Aug 2022 10:19:05 +0200 Subject: use bookmark emoji if possible --- lisp/mastodon-tl.el | 1 + 1 file changed, 1 insertion(+) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index d955a5e..8a600d4 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -590,6 +590,7 @@ LETTER is a string, F for favourited, B for boosted, or K for bookmarked." "bookmarked")))) (format "(%s) " (propertize letter 'face 'mastodon-boost-fave-face + ;; emojify breaks this for 🔖: 'help-echo (format "You have %s this status." help-string))))) -- cgit v1.2.3