From 8c9f827d126a9663c920a3b4b43ad4f26101f3ca Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 13 Oct 2023 16:02:27 +0200 Subject: tl--more*: add cond to handle search data if in search buffer --- lisp/mastodon-tl.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index d32b806..2aea4f4 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2347,6 +2347,14 @@ HEADERS is the http headers returned in the response, if any." (when response (let* ((inhibit-read-only t) (json (if headers (car response) response)) + ;; FIXME: max-id pagination works for statuses only, not other + ;; search results pages: + (json (cond ((equal "statuses" (mastodon-search--buf-type)) + (alist-get 'statuses response)) + ((equal "hashtags" (mastodon-search--buf-type)) + (alist-get 'hashtags response)) + ((equal "accounts" (mastodon-search--buf-type)) + (alist-get 'accounts response)))) (headers (if headers (cdr response) nil)) (link-header (mastodon-tl--get-link-header-from-response headers))) (goto-char (point-max)) -- cgit v1.2.3