aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-notifications.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-10-17 19:28:08 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-10-17 19:28:08 +0200
commitc784cb81ab693d0979425b1cd223df106f9802fc (patch)
tree2751cead714c726dc89899032313613e3d19c6e2 /lisp/mastodon-notifications.el
parent532f608fe52f1dd326df4995dcef69fb5c431c1e (diff)
notifs: fix pagination using grouped min/max ids
Diffstat (limited to 'lisp/mastodon-notifications.el')
-rw-r--r--lisp/mastodon-notifications.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index c2d1962..debc760 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -355,11 +355,8 @@ ACCOUNTS is the notification accounts data."
(if (member type '("follow" "follow_request"))
toot))) ;; account data!
'item-type 'toot ;; for nav, actions, etc.
- 'item-id (or
- ;; grouped notifications pagination max_id:
- ;; NB: their min id used for our max id param
- (alist-get 'page_min_id group)
- (alist-get 'id toot)) ; toot id
+ 'item-id (or (alist-get 'page_max_id group) ;; newest notif
+ (alist-get 'id toot)) ; toot id
'base-item-id (mastodon-tl--item-id
;; if status is a notif, get id from base-toot
;; (-tl--item-id toot) will not work here:
@@ -373,7 +370,10 @@ ACCOUNTS is the notification accounts data."
;; grouped notifs data:
'notification-type type
'notification-group group
- 'notification-accounts accounts)
+ 'notification-accounts accounts
+ ;; for pagination:
+ 'notifications-min-id (alist-get 'page_min_id group)
+ 'notifications-max-id (alist-get 'page_max_id group))
"\n")))
;; FIXME: REFACTOR with -tl--byline?: