From 847b50f315ff96988927e8198eee2517a15cca7b Mon Sep 17 00:00:00 2001 From: mousebot Date: Sat, 5 Feb 2022 14:39:59 +0100 Subject: message for no follow reqs in add-author-bylines fun --- lisp/mastodon-profile.el | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index c04c40b..5811a4a 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -385,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. -- cgit v1.2.3