From d40c54d1748eb6e480fc2b9a5371fd9a6b3cf0c3 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sun, 13 Nov 2022 10:25:16 +0100 Subject: remove extra defvar buffer-spec --- lisp/mastodon-notifications.el | 1 - 1 file changed, 1 deletion(-) (limited to 'lisp/mastodon-notifications.el') diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index c0ca684..22f74ef 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -52,7 +52,6 @@ (autoload 'mastodon-tl--reload-timeline-or-profile "mastodon-tl") (defvar mastodon-tl--buffer-spec) (defvar mastodon-tl--display-media-p) -(defvar mastodon-tl--buffer-spec) (defvar mastodon-notifications--types-alist '(("mention" . mastodon-notifications--mention) -- cgit v1.2.3 From 93944c51aa4612987b85aec28e8707d598bc9c7c Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sun, 13 Nov 2022 15:44:21 +0100 Subject: notifications--follow-request-process -- make non-interactive --- lisp/mastodon-notifications.el | 1 - 1 file changed, 1 deletion(-) (limited to 'lisp/mastodon-notifications.el') diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index 22f74ef..510ef8c 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -86,7 +86,6 @@ With no argument, the request is accepted. Argument REJECT means reject the request. Can be called in notifications view or in follow-requests view." - (interactive) (if (not (mastodon-tl--find-property-range 'toot-json (point))) (message "No follow request at point?") (let* ((toot-json (mastodon-tl--property 'toot-json)) -- cgit v1.2.3 From 791cfb336891e9310dba010cee8afe8a728eda28 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sun, 13 Nov 2022 15:51:09 +0100 Subject: notifs - rename clear-all / clear-current, y-or-n-p --- lisp/mastodon-notifications.el | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'lisp/mastodon-notifications.el') diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index 510ef8c..1ecdbfb 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -267,19 +267,20 @@ of the toot responded to." "notifications" 'mastodon-notifications--timeline)) -(defun mastodon-notifications-clear () +(defun mastodon-notifications--clear-all () "Clear all notifications." (interactive) - (let ((response - (mastodon-http--post (mastodon-http--api "notifications/clear") - nil nil))) - (mastodon-http--triage - response (lambda () - (when mastodon-tl--buffer-spec - (mastodon-tl--reload-timeline-or-profile)) - (message "All notifications cleared!"))))) - -(defun mastodon-notifications-clear-current-notif () + (when (y-or-n-p "Clear all notifications?") + (let ((response + (mastodon-http--post (mastodon-http--api "notifications/clear") + nil nil))) + (mastodon-http--triage + response (lambda () + (when mastodon-tl--buffer-spec + (mastodon-tl--reload-timeline-or-profile)) + (message "All notifications cleared!")))))) + +(defun mastodon-notifications--clear-current () "Dismiss the notification at point." (interactive) (let* ((id (or (mastodon-tl--property 'toot-id) -- cgit v1.2.3