From 608deff68713e7ea2561d0334b81a6a58e568f66 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Fri, 29 Mar 2024 13:47:16 +0100 Subject: bookmarking: no move when checking bookmarked-p status --- lisp/mastodon-toot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/mastodon-toot.el') diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index a48d5d9..d6232d5 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -459,7 +459,7 @@ 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)) + (bookmarked-p (mastodon-tl--property 'bookmarked-p :no-move)) (byline-region (when id (mastodon-tl--find-property-range 'byline (point)))) (action (if bookmarked-p "unbookmark" "bookmark")) -- cgit v1.2.3 From 0739636698d83b6d25d58b832a8466c131e92450 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 24 Apr 2024 21:21:37 +0200 Subject: hack to fix item action toggling when point on item body --- lisp/mastodon-toot.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon-toot.el') 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")) -- cgit v1.2.3