diff options
author | mousebot <mousebot@riseup.net> | 2021-11-06 15:50:54 +0100 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-11-06 15:50:54 +0100 |
commit | 027f24125fae4abc487207c8c81fdc0f20ec711d (patch) | |
tree | 191733a50d689758a501811952a23ec1cf0bf0c6 /lisp/mastodon-tl.el | |
parent | 48f1193558c9655e2215615b5f6d0cf6ea4d4e08 (diff) |
display faves/boosts/replies in threads also for reblogs
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r-- | lisp/mastodon-tl.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 3cb4ccb..b1b7c68 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -726,12 +726,18 @@ takes a single function. By default it is 'base-toot-id (mastodon-tl--toot-id toot) 'help-echo (when (and mastodon-tl--buffer-spec (string-match-p - "context" + "context" ; when thread view (plist-get mastodon-tl--buffer-spec 'endpoint))) - (format "%s faves | %s boosts | %s replies" - (cdr (assoc 'favourites_count toot)) - (cdr (assoc 'reblogs_count toot)) - (cdr (assoc 'replies_count toot)))) + (if (alist-get 'reblog toot) + (let ((reblog (cdr (assoc 'reblog toot)))) + (format "%s faves | %s boosts | %s replies" + (alist-get 'favourites_count reblog) + (alist-get 'reblogs_count reblog) + (alist-get 'replies_count reblog))) + (format "%s faves | %s boosts | %s replies" + (alist-get 'favourites_count toot) + (alist-get 'reblogs_count toot) + (alist-get 'replies_count toot)))) 'toot-json toot) "\n") (when mastodon-tl--display-media-p |