From 5faed06cc47238ffea43145204a90a2bd13b6bf2 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 27 Jan 2023 18:47:20 +0100 Subject: tl--more*: handle calling on last toot in thread view. FIXES #384 for now we funcall tl--thread not on JSON, but on thread parent ID. this will load whole thread, which may be significantly larger than current thread branch view. maybe need more subtlety, later. --- lisp/mastodon-tl.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 8c20b77..5133cad 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2758,7 +2758,12 @@ HEADERS is the http headers returned in the response, if any." (headers (if headers (cdr response) nil)) (link-header (mastodon-tl--get-link-header-from-response headers))) (goto-char (point-max)) - (funcall (mastodon-tl--get-update-function) json) + (if (eq (mastodon-tl--get-buffer-type) 'thread) + ;; if thread view, call --thread with parent ID + (progn (goto-char (point-min)) + (mastodon-tl--goto-next-toot) + (funcall (mastodon-tl--get-update-function))) + (funcall (mastodon-tl--get-update-function) json)) (goto-char point-before) ;; update buffer spec to new link-header: ;; (other values should just remain as they were) -- cgit v1.2.3