aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-04-24 21:21:37 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-04-24 21:21:37 +0200
commit0739636698d83b6d25d58b832a8466c131e92450 (patch)
tree4d096d9898b47c6f69db2b30db77399e4dc197be /lisp/mastodon-toot.el
parente83a88740fb04225d0136cf79b8ae5511005f301 (diff)
hack to fix item action toggling when point on item body
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el9
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index d6232d5..aff201d 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -459,7 +459,14 @@ SUBTRACT means we are un-favouriting or unboosting, so we decrement."
(interactive)
(mastodon-tl--do-if-item-strict
(let* ((id (mastodon-tl--property 'base-item-id))
- (bookmarked-p (mastodon-tl--property 'bookmarked-p :no-move))
+ (bookmarked-p
+ (mastodon-tl--property
+ 'bookmarked-p
+ (if (mastodon-tl--property 'byline :no-move)
+ ;; no move if not in byline, the idea being if in body, we do
+ ;; move forward to byline to toggle correctly.
+ ;; alternatively we could bookmarked-p whole posts.
+ :no-move)))
(byline-region (when id
(mastodon-tl--find-property-range 'byline (point))))
(action (if bookmarked-p "unbookmark" "bookmark"))