From ab900b68f03d1182fb137c48c805285f0f66e2c3 Mon Sep 17 00:00:00 2001 From: Johnson Denen Date: Tue, 25 Apr 2017 23:35:28 -0400 Subject: Store 'favourited-p and 'boosted-p properties on bylines --- lisp/mastodon-tl.el | 9 +++++---- lisp/mastodon-toot.el | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'lisp') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 46e923d..a1535b9 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -141,9 +141,10 @@ Return value from boosted content if available." (mastodon-tl--byline-author toot) (mastodon-tl--byline-boosted toot) (propertize "\n ------------" 'face 'default)) - 'toot-id id - 'toot-json toot))) - + 'favourited-p faved + 'boosted-p boosted + 'toot-id id + 'toot-json toot))) (defun mastodon-tl--set-face (string face render) "Set the face of a string. If `render' is not 'nil @@ -155,7 +156,7 @@ also render the html" (shr-render-region (point-min) (point-max))) (buffer-string)) 'face face)) - + (defun mastodon-tl--spoiler (toot) "Retrieve spoiler message from TOOT." (let* ((spoiler (mastodon-tl--field 'spoiler_text toot)) diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 104df1c..41b69cc 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -69,7 +69,7 @@ If FAVED is nil, favourite the toot. If FAVED is non-nil, unfavourite the toot." (interactive) (let* ((id (mastodon-tl--property 'toot-id)) - (faved (get-text-property (point) 'favourite-p)) + (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))) -- cgit v1.2.3