aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-08-01 19:38:34 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-08-01 19:38:34 +0200
commite66ce7b6fb55a5f78a840ca4c00aa9773bbc9e4f (patch)
tree8f21acf2b0bcb034f280d4a1be6688edeaeae14c /lisp/mastodon-tl.el
parent8d6983667d51f6aec7a024bb0e2f3dd3fdddb7f4 (diff)
folding comments / action docstring
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el18
1 files changed, 16 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 651427a..797b355 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1588,14 +1588,28 @@ Folding decided by `mastodon-tl--fold-toots-at-length'."
(let* ((byline (mastodon-tl--property 'byline :no-move))
(read-more-p (mastodon-tl--find-property-range
'read-more (point) byline)))
+ ;; FIXME: handle any point of the item body and byline
+ ;; ie if we are inbetween, try moving up or down (and check again?)
(if (and (not fold)
(not read-more-p))
(user-error "No folded item at point?")
(let* ((inhibit-read-only t)
(range (mastodon-tl--find-property-range 'item-json (point)))
+ ;; FIXME: we need to reload toot data if we want
+ ;; fave/boost/bookmark stats to display correctly. ie if we do
+ ;; an action then (un)fold, stats/(*)/etc display incorrectly.
+
+ ;; another option may be to check favourited-p/boosted-p prop,
+ ;; and then call toot--action-success again with the relevant
+ ;; symbol (to insert it after re-display)? as per
+ ;; `mastodon-toot--toggle-boost-or-favourite' callback?
+
+ ;; or, is it simpler to just not replace the byline? to do that,
+ ;; we need to call `mastodont-tl--insert-status' without
+ ;; inserting a byline, so that props are all correct...
(toot (mastodon-tl--property 'item-json)))
- ;; `replace-region-contents' is much to slow, our hack from fedi.el is
- ;; much simpler and much faster
+ ;; `replace-region-contents' is much too slow, our hack from fedi.el
+ ;; is much simpler and much faster:
(let ((beg (car range))
(end (cdr range))
(last-point (point)))