diff options
author | Johnson Denen <johnson.denen@gmail.com> | 2017-04-19 09:25:10 -0400 |
---|---|---|
committer | Johnson Denen <johnson.denen@gmail.com> | 2017-04-19 09:25:10 -0400 |
commit | 232c621682f1d7b7be4a8b7cd14efc15033a44e3 (patch) | |
tree | 6def93f0c68f27fbbaada03662a5589e61635e41 /lisp | |
parent | ebf22afa9a1f5007f0cdf1da07a55218212828c9 (diff) |
Better feedback on boost/favourite
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-toot.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 78d0f22..fc06e66 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -70,11 +70,10 @@ STATUS is passed by `url-retrieve'." (defun mastodon-toot--action-success (marker) "Insert MARKER with 'success face in byline." (let ((inhibit-read-only t)) - (mastodon-tl--property 'toot-id) (goto-char (+ 3 (point))) (insert (format "(%s) " - (propertize marker - 'face 'success))))) + (propertize marker 'face 'success))) + (mastodon-tl--goto-prev-toot))) (defun mastodon-toot--action-triage (response callback) "Parse response code from RESPONSE buffer. @@ -99,14 +98,18 @@ Execute CALLBACK function if response was OK." (defun mastodon-toot--boost () "Boost toot at `point'." (interactive) - (let ((callback (lambda () (mastodon-toot--action-success "B")))) - (mastodon-toot--action "reblog" callback))) + (let ((callback (lambda () (mastodon-toot--action-success "B"))) + (id (mastodon-tl--property 'toot-id))) + (mastodon-toot--action "reblog" callback) + (message (format "Boosted #%s" id)))) (defun mastodon-toot--favourite () "Favourite toot at `point'." (interactive) - (let ((callback (lambda () (mastodon-toot--action-success "F")))) - (mastodon-toot--action "favourite" callback))) + (let ((callback (lambda () (mastodon-toot--action-success "F"))) + (id (mastodon-tl--property 'toot-id))) + (mastodon-toot--action "favourite" callback) + (message (format "Favourited #%s" id)))) (defun mastodon-toot--reply () "Reply to toot at `point'." |