emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mastodon b01797b702 37/47: work on tl--more*: msg if no mo


From: ELPA Syncer
Subject: [nongnu] elpa/mastodon b01797b702 37/47: work on tl--more*: msg if no more results, or if load full thread
Date: Fri, 13 Oct 2023 19:00:57 -0400 (EDT)

branch: elpa/mastodon
commit b01797b70227c01d63a593abda281fae720a56c9
Author: marty hiatt <martianhiatus [a t] riseup [d o t] net>
Commit: marty hiatt <martianhiatus [a t] riseup [d o t] net>

    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 9209026ff1..7814a696e4 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]