aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-06-27 15:33:17 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-06-27 15:33:17 +0200
commitd9d3bb07a65ee6350a3272d589e8298436eb34fb (patch)
treeadf194264385d0874cadc7192e1f8becff82e321 /lisp/mastodon-tl.el
parent30b14bb52c852e1faa521e2d6e58d6aef01bdf71 (diff)
handle updating a single-toot view. FIX #476.
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index aa52f82..f7f000b 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1689,8 +1689,16 @@ ID is that of the toot to view."
(if (equal (caar toot) 'error)
(message "Error: %s" (cdar toot))
(with-mastodon-buffer buffer #'mastodon-mode nil
- (mastodon-tl--set-buffer-spec buffer (format "statuses/%s" id) nil)
- (mastodon-tl--toot toot :detailed-p)))))
+ (mastodon-tl--set-buffer-spec buffer (format "statuses/%s" id)
+ #'mastodon-tl--update-toot)
+ (mastodon-tl--toot toot :detailed-p)
+ (goto-char (point-min))
+ (mastodon-tl--goto-next-item)))))
+
+(defun mastodon-tl--update-toot (json)
+ ""
+ (let ((id (alist-get 'id json)))
+ (mastodon-tl--single-toot id)))
(defun mastodon-tl--view-whole-thread ()
"From a thread view, view entire thread.