From 3c3ef2e98ff81e94446c6e749759f0422f2aa140 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Thu, 17 Oct 2024 15:06:13 +0200 Subject: notifs: improve insert-note text props. fixes pagination (hack) --- lisp/mastodon-notifications.el | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el index f8f093b..14f2be5 100644 --- a/lisp/mastodon-notifications.el +++ b/lisp/mastodon-notifications.el @@ -354,19 +354,23 @@ ACCOUNTS is the notification accounts data." base-toot group (if (member type '("follow" "follow_request")) toot))) ;; account data! - 'item-type 'toot - 'item-id (or id ; notification's own id - (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: - (or base-toot - toot)) ; else normal toot with reblog check - 'item-json toot - 'base-toot base-toot - 'cursor-face 'mastodon-cursor-highlight-face + 'item-type 'notification + '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 + '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: + (or base-toot + toot)) ; else normal toot with reblog check + 'item-json toot + 'base-toot base-toot + 'cursor-face 'mastodon-cursor-highlight-face 'toot-foldable toot-foldable - 'toot-folded (and toot-foldable (not unfolded)) + 'toot-folded (and toot-foldable (not unfolded)) + ;; grouped notifs data: 'notification-type type 'notification-group group 'notification-accounts accounts) -- cgit v1.2.3