From a164bda8719733f4a13e22ba7257ca4bcab0fb17 Mon Sep 17 00:00:00 2001 From: mousebot Date: Fri, 24 Dec 2021 14:36:37 +0100 Subject: refactor follow request accept/reject functions. previously we had duplication of functions depending on whether we were in follow requests view or notificaitons view. now we just check which kind of f-req we have and act accordingly. main function being `mastodon-notifications--follow-request-process'. also updates keybindings for both views. we no longer need them included separately in profile-mode. --- lisp/mastodon.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lisp/mastodon.el') diff --git a/lisp/mastodon.el b/lisp/mastodon.el index d5f9b6e..f65a86d 100644 --- a/lisp/mastodon.el +++ b/lisp/mastodon.el @@ -69,8 +69,8 @@ (autoload 'mastodon-profile--my-profile "mastodon-profile") (autoload 'mastodon-profile--view-favourites "mastodon-profile") (autoload 'mastodon-profile--view-follow-requests "mastodon-profile") -(autoload 'mastodon-notifications--follow-request-accept-notifs "mastodon-profile") -(autoload 'mastodon-notifications--follow-request-reject-notifs "mastodon-profile") +(autoload 'mastodon-notifications--follow-request-accept "mastodon-notifications") +(autoload 'mastodon-notifications--follow-request-reject "mastodon-notifications") (autoload 'mastodon-search--search-query "mastodon-search") ;; (autoload 'mastodon-toot--delete-toot "mastodon-toot") ;; (autoload 'mastodon-toot--copy-toot-url "mastodon-toot") @@ -160,8 +160,8 @@ Use. e.g. \"%c\" for your locale's date and time format." ;; (define-key map (kbd "C-c l") #'mastodon-async--stream-local) ;; (define-key map (kbd "C-c n") #'mastodon-async--stream-notifications) (define-key map (kbd "U") #'mastodon-profile--update-user-profile-note) - (define-key map (kbd "a") #'mastodon-notifications--follow-request-accept-notifs) - (define-key map (kbd "j") #'mastodon-notifications--follow-request-reject-notifs) + (define-key map (kbd "a") #'mastodon-notifications--follow-request-accept) + (define-key map (kbd "j") #'mastodon-notifications--follow-request-reject) (define-key map (kbd "v") #'mastodon-tl--poll-vote) (define-key map (kbd "k") #'mastodon-toot--bookmark-toot-toggle) (define-key map (kbd "K") #'mastodon-profile--view-bookmarks) -- cgit v1.2.3