aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/mastodon-tl.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 83fdabc..9a3c798 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1010,10 +1010,14 @@ content should be hidden."
'mastodon-tl--thread)))
(if (not thread-p)
(user-error "Not in a thread")
- (goto-char (point-min))
- (while (not (equal "No more items" ; improve this hack test!
- (mastodon-tl--goto-next-item :no-refresh)))
- (mastodon-tl--toggle-spoiler-text-in-toot)))))
+ (save-excursion
+ (goto-char (point-min))
+ (while (not (equal "No more items" ; improve this hack test!
+ (mastodon-tl--goto-next-item :no-refresh)))
+ (let* ((json (mastodon-tl--property 'item-json :no-move))
+ (cw (alist-get 'spoiler_text json)))
+ (when (not (equal "" cw))
+ (mastodon-tl--toggle-spoiler-text-in-toot))))))))
(defun mastodon-tl--clean-tabs-and-nl (string)
"Remove tabs and newlines from STRING."