aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-13 10:48:29 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-13 11:10:49 +0100
commit30bb20037bf6af1b1469718c256700a21d9724e7 (patch)
tree74d8d505802140ef4b632ccc0c27be349c01d358
parentd40c54d1748eb6e480fc2b9a5371fd9a6b3cf0c3 (diff)
tl--goto-toot-pos - message help echo on moving to toot byline
-rw-r--r--lisp/mastodon-tl.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 48d238c..a916bc5 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -283,6 +283,18 @@ text, i.e. hidden spoiler text."
(mastodon-tl--init
(concat "tag-" tag) (concat "timelines/tag/" tag) 'mastodon-tl--timeline))
+(defun mastodon-tl--message-help-echo ()
+ "Call message on 'help-echo property at point.
+Do so if type of status at poins is not follow_request/follow."
+ (let ((type (alist-get
+ 'type
+ (get-text-property (point) 'toot-json)))
+ (echo (get-text-property (point) 'help-echo)))
+ (when echo ; not for followers/following in profile
+ (unless (or (string= type "follow_request")
+ (string= type "follow")) ; no counts for these
+ (message "%s" (get-text-property (point) 'help-echo))))))
+
(defun mastodon-tl--goto-toot-pos (find-pos refresh &optional pos)
"Search for toot with FIND-POS.
If search returns nil, execute REFRESH function.
@@ -295,7 +307,9 @@ Optionally start from POS."
(if npos
(if (not (get-text-property npos 'toot-id))
(mastodon-tl--goto-toot-pos find-pos refresh npos)
- (goto-char npos))
+ (goto-char npos)
+ ;; force display of help-echo on moving to a toot byline:
+ (mastodon-tl--message-help-echo))
(funcall refresh))))
(defun mastodon-tl--goto-next-toot ()