diff options
author | mousebot <mousebot@riseup.net> | 2022-02-13 11:52:50 +0100 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2022-02-13 11:52:50 +0100 |
commit | 6c8caed00adf1d6e3ba1f81a91489ecb66deefb2 (patch) | |
tree | d6aa7718ddd0bcf039f48307726d111f2e083d51 /lisp/mastodon-profile.el | |
parent | 5a0cc2fcc5fa0dad2d884dcc9989222d6df9e88e (diff) | |
parent | 8a29dcda6827e97b742bb718eb3a7687497f5261 (diff) |
Merge branch 'develop'
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r-- | lisp/mastodon-profile.el | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 21b40b3..5811a4a 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -5,7 +5,7 @@ ;; Maintainer: Marty Hiatt <martianhiatus@riseup.net> ;; Version: 0.10.0 ;; Package-Requires: ((emacs "27.1") (seq "1.0")) -;; Homepage: https://git.blast.noho.st/mouse/mastodon.el +;; Homepage: https://codeberg.org/martianh/mastodon.el ;; This file is not part of GNU Emacs. @@ -146,7 +146,6 @@ extra keybindings." (defun mastodon-profile--view-follow-requests () "Open a new buffer displaying the user's follow requests." (interactive) - (mastodon-profile-mode) (mastodon-tl--init "follow-requests" "follow_requests" 'mastodon-profile--add-author-bylines)) @@ -386,20 +385,22 @@ FIELD is used to identify regions under 'account" (defun mastodon-profile--add-author-bylines (tootv) "Convert TOOTV into a author-bylines and insert." (let ((inhibit-read-only t)) - (mapc (lambda (toot) - (let ((start-pos (point))) - (insert "\n" - (propertize - (mastodon-tl--byline-author `((account . ,toot))) - 'byline 't - 'toot-id (alist-get 'id toot) - 'base-toot-id (mastodon-tl--toot-id toot) - 'toot-json toot)) - (mastodon-media--inline-images start-pos (point)) - (insert "\n" - (mastodon-tl--render-text (alist-get 'note toot) nil) - "\n"))) - tootv))) + (if (equal tootv '[]) + (message "Looks like you have no follow requests for the moment.") + (mapc (lambda (toot) + (let ((start-pos (point))) + (insert "\n" + (propertize + (mastodon-tl--byline-author `((account . ,toot))) + 'byline 't + 'toot-id (alist-get 'id toot) + 'base-toot-id (mastodon-tl--toot-id toot) + 'toot-json toot)) + (mastodon-media--inline-images start-pos (point)) + (insert "\n" + (mastodon-tl--render-text (alist-get 'note toot) nil) + "\n"))) + tootv)))) (defun mastodon-profile--search-account-by-handle (handle) "Return an account based on a user's HANDLE. |