[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mastodon e9f77777dd 11/18: add cycle notif function. FIX #
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mastodon e9f77777dd 11/18: add cycle notif function. FIX #628. |
Date: |
Mon, 2 Dec 2024 16:00:34 -0500 (EST) |
branch: elpa/mastodon
commit e9f77777dd6cec7ed931295f45b61d6a254e0857
Author: marty hiatt <martianhiatus@disroot.org>
Commit: marty hiatt <martianhiatus@disroot.org>
add cycle notif function. FIX #628.
---
lisp/mastodon-notifications.el | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index c302db0e22..6a67fa8e24 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -83,7 +83,7 @@
"A list of notification types according to their name on the server, plus
\"all\".")
(defvar mastodon-notifications--filter-types-alist
- '(("all" . mastodon-notifications--get)
+ '(("all" . mastodon-notifications-get)
("favourite" . mastodon-notifications--get-favourites)
("reblog" . mastodon-notifications--get-boosts)
("mention" . mastodon-notifications--get-mentions)
@@ -112,6 +112,7 @@ Notification types are named according to their name on the
server.")
(define-key map (kbd "a") #'mastodon-notifications--follow-request-accept)
(define-key map (kbd "j") #'mastodon-notifications--follow-request-reject)
(define-key map (kbd "C-k") #'mastodon-notifications--clear-current)
+ (define-key map (kbd "C-c C-c") #'mastodon-notifications--cycle-type)
map)
"Keymap for viewing notifications.")
@@ -503,7 +504,8 @@ NO-GROUP means don't render grouped notifications."
:newline)
(insert "\n")
(mastodon-notifications--render json (not mastodon-group-notifications))
- (goto-char (point-min))))
+ (goto-char (point-min))
+ (mastodon-tl--goto-next-item)))
(defun mastodon-notifications--get-type (&optional type)
"Read a notification type and load its timeline."
@@ -516,6 +518,20 @@ NO-GROUP means don't render grouped notifications."
choice mastodon-notifications--filter-types-alist
nil nil #'equal))))
+(defun mastodon-notifications--cycle-type ()
+ "Cycle the current notifications view."
+ (interactive)
+ (let* ((update-params (mastodon-tl--buffer-property
+ 'update-params nil :no-error))
+ (type (alist-get "types[]" update-params nil nil #'equal))
+ (next (if (not update-params)
+ (cadr mastodon-notifications--types)
+ (or (cadr (member type mastodon-notifications--types))
+ (car mastodon-notifications--types))))
+ (fun (alist-get next mastodon-notifications--filter-types-alist
+ nil nil #'equal)))
+ (funcall fun)))
+
(defun mastodon-notifications--get-mentions ()
"Display mention notifications in buffer."
(interactive)
- [nongnu] elpa/mastodon updated (cf64163130 -> 10be1f9c28), ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 2cfaf7458c 01/18: prefix for profile cycle completing-read. FIX #624., ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 7b98a4ca2a 02/18: notifs: typo in fun name prefix, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 7bc28cc75f 12/18: add prefix and view check to notif cycle, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 12d174dfd3 06/18: thread-do on reload after reply and bookmark load. FIX #625, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon a472f873a3 09/18: add widget to notifs view., ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 1545f3b78e 05/18: get-toot-author: never get booster profile. #630., ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon e9f77777dd 11/18: add cycle notif function. FIX #628.,
ELPA Syncer <=
- [nongnu] elpa/mastodon 10be1f9c28 18/18: Merge branch 'develop', ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 95d06a03eb 15/18: flycheck notifs.el, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 241d26dc1f 10/18: notif types: use types[] not exclude_types[], ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon be4a64a4ff 13/18: index, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon ba7e98c29c 17/18: bump, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 08307fee1b 14/18: notifs: require mastodon-widget, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon c08a84f82b 16/18: notifs cycle: buff type mentions or notifs, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 00b1ac63d5 04/18: notifications--render: fallback to first id if no status_id. ??, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon e400757d24 03/18: view notifs by type, w completing-read. #628., ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 213b5b4f5f 07/18: get-toot-author: use do-if-item, not with-toot-item., ELPA Syncer, 2024/12/02