From 471d540c01ee45464bfc8a3d3cdcfaf91738ce99 Mon Sep 17 00:00:00 2001 From: mousebot Date: Fri, 4 Feb 2022 13:00:02 +0100 Subject: update homepage and copyright boilerplate --- lisp/mastodon-profile.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/mastodon-profile.el') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 21b40b3..436ba87 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -5,7 +5,7 @@ ;; Maintainer: Marty Hiatt ;; 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. -- cgit v1.2.3 From 2f58b4fd7de85367156caa9f39ac46e54f262fb9 Mon Sep 17 00:00:00 2001 From: mousebot Date: Sat, 5 Feb 2022 14:31:46 +0100 Subject: don't call mastodon-profile-mode in profile--view-follow-requests it's now called in tl-init* for follow requests inits. calling it here also enables profile mode in whatever bufer view-follow-reqs was called from, which is useless. --- lisp/mastodon-profile.el | 1 - 1 file changed, 1 deletion(-) (limited to 'lisp/mastodon-profile.el') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 436ba87..c04c40b 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -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)) -- cgit v1.2.3 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(-) (limited to 'lisp/mastodon-profile.el') 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