aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index ad8cc1a..a357146 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1619,6 +1619,17 @@ Folding decided by `mastodon-tl--fold-toots-at-length'."
(interactive)
(mastodon-tl--unfold-post :fold))
+(defun mastodon-tl--fold-post-toggle ()
+ "Toggle the folding status of the toot at point."
+ (interactive)
+ (let* ((byline-p (mastodon-tl--property 'byline))
+ (read-more-p (save-excursion
+ (when byline-p
+ (previous-line)
+ (beginning-of-line))
+ (mastodon-tl--property 'read-more))))
+ (mastodon-tl--unfold-post (if (not read-more-p) :fold))))
+
;; from mastodon-alt.el:
(defun mastodon-tl--toot-for-stats (&optional toot)
"Return the TOOT on which we want to extract stats.