diff options
author | mousebot <mousebot@riseup.net> | 2021-05-08 10:06:53 +0200 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2021-05-08 10:06:53 +0200 |
commit | b5541f5e3fe29fba0acd480ea9c3bcbf36c70085 (patch) | |
tree | fe80e906355e7228ba7865826bf8dc11c6b43e70 /lisp/mastodon-profile.el | |
parent | 083b085ebce6753001c8fe6798f5f44f2c3971c1 (diff) |
add toot/follows/followers counts to profile buffer
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r-- | lisp/mastodon-profile.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index bf6007f..a5fb1a9 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -107,7 +107,10 @@ following the current profile." id endpoint-type))) (buffer (concat "*mastodon-" acct "-" endpoint-type "*")) (note (mastodon-profile--account-field account 'note)) - (json (mastodon-http--get-json url))) + (json (mastodon-http--get-json url)) + (fol_count (mastodon-tl--as-string (mastodon-profile--account-field account 'followers_count))) + (folling_count (mastodon-tl--as-string (mastodon-profile--account-field account 'following_count))) + (toots_count (mastodon-tl--as-string (mastodon-profile--account-field account 'statuses_count)))) (with-output-to-temp-buffer buffer (switch-to-buffer buffer) (mastodon-mode) @@ -139,6 +142,13 @@ following the current profile." (mastodon-tl--render-text note nil) (mastodon-tl--set-face (concat " ------------\n" + "TOOTS: " toots_count " | " + "FOLLOWERS: " fol_count " | " + "FOLLOWING: " folling_count "\n" + " ------------\n\n") + 'success) + (mastodon-tl--set-face + (concat " ------------\n" endpoint-name "\n" " ------------\n") 'success)) |