aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-notifications.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-13 16:23:00 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-13 16:23:00 +0100
commitde458e7865f91f187b1695c889fc77ea47f1497c (patch)
tree4ba4d124d6785d0a9942c637120264e47242df7b /lisp/mastodon-notifications.el
parentfed5c23d21b75d9a4ee8ca8a6a3e398fae483b8b (diff)
parenta344112c03f3d6c016f5f4c48e5c932b840f6ab1 (diff)
Merge branch 'develop'
Diffstat (limited to 'lisp/mastodon-notifications.el')
-rw-r--r--lisp/mastodon-notifications.el25
1 files changed, 12 insertions, 13 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index c0ca684..1ecdbfb 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)
@@ -87,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))
@@ -269,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)