Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Fix #57 by moving messages into callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
jdenen committed Apr 28, 2017
1 parent 5f49664 commit bd32a1c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lisp/mastodon-toot.el
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,10 @@ Remove MARKER if RM is non-nil."
(action (if boosted "unreblog" "reblog"))
(msg (if boosted "unboosted" "boosted"))
(remove (when boosted t)))
(mastodon-toot--action action (lambda () (mastodon-toot--action-success "B" remove)))
(message (format "%s #%s" msg id))))
(mastodon-toot--action action
(lambda ()
(mastodon-toot--action-success "B" remove)
(message (format "%s #%s" msg id))))))

(defun mastodon-toot--toggle-favourite ()
"Favourite/unfavourite toot at `point'."
Expand All @@ -80,8 +82,10 @@ Remove MARKER if RM is non-nil."
(faved (get-text-property (point) 'favourited-p))
(action (if faved "unfavourite" "favourite"))
(remove (when faved t)))
(mastodon-toot--action action (lambda () (mastodon-toot--action-success "F" remove)))
(message (format "%sd #%s" action id))))
(mastodon-toot--action action
(lambda ()
(mastodon-toot--action-success "F" remove)
(message (format "%sd #%s" action id))))))

(defun mastodon-toot--kill ()
"Kill `mastodon-toot-mode' buffer and window.
Expand Down

0 comments on commit bd32a1c

Please sign in to comment.