aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2023-10-23 10:48:08 +0200
committermarty hiatt <martianhiatus@riseup.net>2023-10-23 10:48:08 +0200
commite954ae162cb559f35373e1203f0225a470f65c98 (patch)
tree148861ad9c2a156e58700ee444100ef9c40368e2 /lisp
parent47865bd21551616d5d149afa6c574b2bfd0f118f (diff)
no y-or-n-p for (un)bookmarking
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-toot.el24
1 files changed, 10 insertions, 14 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 6fba951..3f20a14 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -446,9 +446,6 @@ SUBTRACT means we are un-favouriting or unboosting, so we decrement."
(mastodon-tl--do-if-item-strict
(let* ((id (mastodon-tl--property 'base-item-id))
(bookmarked-p (mastodon-tl--property 'bookmarked-p))
- (prompt (if bookmarked-p
- (format "Toot already bookmarked. Remove? ")
- (format "Bookmark this toot? ")))
(byline-region (when id
(mastodon-tl--find-property-range 'byline (point))))
(action (if bookmarked-p "unbookmark" "bookmark"))
@@ -458,17 +455,16 @@ SUBTRACT means we are un-favouriting or unboosting, so we decrement."
"Toot bookmarked!"))
(remove (when bookmarked-p t)))
(if byline-region
- (when (y-or-n-p prompt)
- (mastodon-toot--action
- action
- (lambda ()
- (let ((inhibit-read-only t))
- (add-text-properties (car byline-region)
- (cdr byline-region)
- (list 'bookmarked-p (not bookmarked-p))))
- (mastodon-toot--action-success bookmark-str
- byline-region remove)
- (message (format "%s #%s" message id)))))
+ (mastodon-toot--action
+ action
+ (lambda ()
+ (let ((inhibit-read-only t))
+ (add-text-properties (car byline-region)
+ (cdr byline-region)
+ (list 'bookmarked-p (not bookmarked-p))))
+ (mastodon-toot--action-success bookmark-str
+ byline-region remove)
+ (message (format "%s #%s" message id))))
(message (format "Nothing to %s here?!?" action))))))
(defun mastodon-toot--list-toot-boosters ()