diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-12-28 15:57:44 +1100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-12-28 15:57:44 +1100 |
commit | c147e78b1aa6369eef4f3380b6d9df73055cb341 (patch) | |
tree | 2297ce8d64d9561a700d708d80d725567233e0b2 /lisp/mastodon-tl.el | |
parent | 0eeb429d3531a3c11cc9ea3c3aef258b7c671edb (diff) |
FIX pagination of local timeline
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r-- | lisp/mastodon-tl.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 570baf8..8ae0ded 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -404,7 +404,8 @@ Used on initializing a timeline or thread." (interactive) (message "Loading local timeline...") (mastodon-tl--init - "local" "timelines/public?local=true" 'mastodon-tl--timeline)) + "local" "timelines/public" 'mastodon-tl--timeline + nil '(("local" . "true")))) (defun mastodon-tl--get-tag-timeline () "Prompt for tag and opens its timeline." @@ -2552,7 +2553,7 @@ For use after e.g. deleting a toot." (mastodon-tl--get-home-timeline)) ((equal (mastodon-tl--get-endpoint) "timelines/public") (mastodon-tl--get-federated-timeline)) - ((equal (mastodon-tl--get-endpoint) "timelines/public?local=true") + ((equal (mastodon-tl--get-buffer-property 'buffer-name "*mastodon-local*")) (mastodon-tl--get-local-timeline)) ((equal (mastodon-tl--get-endpoint) "notifications") (mastodon-notifications-get)) @@ -2785,7 +2786,7 @@ from the start if it is nil." (when headers (split-string (alist-get "Link" headers nil nil 'equal) ", "))) -(defun mastodon-tl--init (buffer-name endpoint update-function &optional headers) +(defun mastodon-tl--init (buffer-name endpoint update-function &optional headers params) "Initialize BUFFER-NAME with timeline targeted by ENDPOINT asynchronously. UPDATE-FUNCTION is used to recieve more toots. HEADERS means to also collect the response headers. Used for paginating @@ -2794,9 +2795,9 @@ favourites and bookmarks." (buffer (concat "*mastodon-" buffer-name "*"))) (if headers (mastodon-http--get-response-async - url nil 'mastodon-tl--init* buffer endpoint update-function headers) + url params 'mastodon-tl--init* buffer endpoint update-function headers) (mastodon-http--get-json-async - url nil 'mastodon-tl--init* buffer endpoint update-function)))) + url params 'mastodon-tl--init* buffer endpoint update-function)))) (defun mastodon-tl--init* (response buffer endpoint update-function &optional headers) "Initialize BUFFER with timeline targeted by ENDPOINT. |