From b01797b70227c01d63a593abda281fae720a56c9 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 13 Oct 2023 22:29:27 +0200 Subject: work on tl--more*: msg if no more results, or if load full thread --- lisp/mastodon-tl.el | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 9209026..7814a69 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -2403,17 +2403,21 @@ HEADERS is the http headers returned in the response, if any." ;; if thread view, call --thread with parent ID (progn (goto-char (point-min)) (mastodon-tl--goto-next-toot) - (funcall (mastodon-tl--update-function))) - (funcall (mastodon-tl--update-function) json)) - (goto-char point-before) - ;; update buffer spec to new link-header: - ;; (other values should just remain as they were) - (when headers - (mastodon-tl--set-buffer-spec (mastodon-tl--buffer-name) - (mastodon-tl--endpoint) - (mastodon-tl--update-function) - link-header)) - (message "Loading older toots... done."))))) + (funcall (mastodon-tl--update-function)) + (goto-char point-before) + (message "Loaded full thread.")) + (if (not json) + (message "No more results.") + (funcall (mastodon-tl--update-function) json) + (goto-char point-before) + ;; update buffer spec to new link-header: + ;; (other values should just remain as they were) + (when headers + (mastodon-tl--set-buffer-spec (mastodon-tl--buffer-name) + (mastodon-tl--endpoint) + (mastodon-tl--update-function) + link-header)) + (message "Loading older toots... done."))))))) (defun mastodon-tl--find-property-range (property start-point &optional search-backwards) -- cgit v1.2.3