From f5094f4cb0bc527524b90fdb1cc2dd700c4b4851 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 14 Oct 2023 19:06:57 +0200 Subject: add params arg to init-sync, use limit param for foll_reqs/sugests --- lisp/mastodon-views.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-views.el') diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index 8110e50..dd46b59 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -443,6 +443,7 @@ If ID is provided, use that list." ;;; FOLLOW REQUESTS +;; TODO: paginates by link header (defun mastodon-views--insert-follow-requests (json) "Insert the user's current follow requests. @@ -458,7 +459,9 @@ JSON is the data returned by the server." (interactive) (mastodon-tl--init-sync "follow-requests" "follow_requests" - 'mastodon-views--insert-follow-requests) + 'mastodon-views--insert-follow-requests + nil + '(("limit" . "80"))) ; server max (mastodon-tl--goto-first-item) (with-current-buffer "*mastodon-follow-requests*" (use-local-map mastodon-views--view-follow-requests-keymap))) @@ -650,13 +653,16 @@ Prompt for a context, must be a list containting at least one of \"home\", ;;; FOLLOW SUGGESTIONS +;; No pagination: max 80 results (defun mastodon-views--view-follow-suggestions () "Display a buffer of suggested accounts to follow." (interactive) (mastodon-tl--init-sync "follow-suggestions" "suggestions" - 'mastodon-views--insert-follow-suggestions) + 'mastodon-views--insert-follow-suggestions + nil + '(("limit" . "80"))) ; server max (with-current-buffer "*mastodon-follow-suggestions*" (use-local-map mastodon-views--follow-suggestions-map))) -- cgit v1.2.3