From 43d90313f2e879cd37b7123b87dcf53819605128 Mon Sep 17 00:00:00 2001 From: mousebot Date: Mon, 7 Feb 2022 19:52:35 +0100 Subject: add go to next toot to tl--thread fix go to first toot on thread load --- lisp/mastodon-tl.el | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 13c6729..8921259 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -977,19 +977,21 @@ webapp" (if (> (+ (length (alist-get 'ancestors context)) (length (alist-get 'descendants context))) 0) - (with-output-to-temp-buffer buffer - (switch-to-buffer buffer) - (mastodon-mode) - (setq mastodon-tl--buffer-spec - `(buffer-name ,buffer - endpoint ,(format "statuses/%s/context" id) - update-function - (lambda(toot) (message "END of thread.")))) - (let ((inhibit-read-only t)) - (mastodon-tl--timeline (vconcat - (alist-get 'ancestors context) - `(,toot) - (alist-get 'descendants context))))) + (progn + (with-output-to-temp-buffer buffer + (switch-to-buffer buffer) + (mastodon-mode) + (setq mastodon-tl--buffer-spec + `(buffer-name ,buffer + endpoint ,(format "statuses/%s/context" id) + update-function + (lambda (toot) (message "END of thread.")))) + (let ((inhibit-read-only t)) + (mastodon-tl--timeline (vconcat + (alist-get 'ancestors context) + `(,toot) + (alist-get 'descendants context))))) + (mastodon-tl--goto-next-toot)) (message "No Thread!")))) (defun mastodon-tl--get-follow-suggestions () -- cgit v1.2.3