diff options
-rw-r--r-- | lisp/mastodon-tl.el | 24 | ||||
-rw-r--r-- | lisp/mastodon-toot.el | 11 |
2 files changed, 23 insertions, 12 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index f9b6bf6..4e2a8ba 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -519,7 +519,10 @@ AUTHOR-BYLINE is a function for adding the author portion of the byline that takes one variable. ACTION-BYLINE is a function for adding an action, such as boosting, favouriting and following to the byline. It also takes a single function. -By default it is `mastodon-tl--byline-boosted'" +By default it is `mastodon-tl--byline-boosted'. + +DETAILED-P means display more detailed info. For now +this just means displaying toot client." (let* ((created-time ;; bosts and faves in notifs view ;; (makes timestamps be for the original toot @@ -585,10 +588,10 @@ By default it is `mastodon-tl--byline-boosted'" 'face 'mastodon-display-name-face 'follow-link t 'mouse-face 'highlight - 'mastodon-tab-stop 'shr-url - 'shr-url app-url + 'mastodon-tab-stop 'shr-url + 'shr-url app-url 'help-echo app-url - 'keymap mastodon-tl--shr-map-replacement))))) + 'keymap mastodon-tl--shr-map-replacement))))) (propertize "\n ------------\n" 'face 'default)) 'favourited-p faved 'boosted-p boosted @@ -890,7 +893,8 @@ Runs `mastodon-tl--render-text' and fetches poll or media." (mastodon-tl--get-poll toot)) (mastodon-tl--media toot)))) -(defun mastodon-tl--insert-status (toot body author-byline action-byline &optional id parent-toot detailed-p) +(defun mastodon-tl--insert-status (toot body author-byline action-byline + &optional id parent-toot detailed-p) "Display the content and byline of timeline element TOOT. BODY will form the section of the toot above the byline. @@ -904,7 +908,10 @@ takes a single function. By default it is ID is that of the toot, which is attached as a property if it is a notification. If the status is a favourite or a boost, -PARENT-TOOT is the JSON of the toot responded to." +PARENT-TOOT is the JSON of the toot responded to. + +DETAILED-P means display more detailed info. For now +this just means displaying toot client." (let ((start-pos (point))) (insert (propertize @@ -1043,7 +1050,10 @@ in which case play first video or gif from current toot." (message "no moving image here?")))) (defun mastodon-tl--toot (toot &optional detailed-p) - "Formats TOOT and insertes it into the buffer." + "Formats TOOT and insertes it into the buffer. + +DETAILED-P means display more detailed info. For now +this just means displaying toot client." (mastodon-tl--insert-status toot (mastodon-tl--clean-tabs-and-nl diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 0da660e..0e26bb2 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -207,7 +207,8 @@ Remove MARKER if REMOVE is non-nil, otherwise add it." (defun mastodon-toot--action (action callback) "Take ACTION on toot at point, then execute CALLBACK. -Makes a POST request to the server." +Makes a POST request to the server. Used for favouriting, +boosting, or bookmarking toots." (let* ((id (mastodon-tl--property 'base-toot-id)) (url (mastodon-http--api (concat "statuses/" (mastodon-tl--as-string id) @@ -240,11 +241,11 @@ TYPE is a symbol, either 'favourite or 'boost." (if byline-region (cond ;; actually there's nothing wrong with faving/boosting own toots! ;;((mastodon-toot--own-toot-p (mastodon-tl--property 'toot-json)) - ;;(error "You can't %s your own toots." action-string)) + ;;(error "You can't %s your own toots" action-string)) ((equal "reblog" toot-type) - (error "You can't %s boosts." action-string)) + (error "You can't %s boosts" action-string)) ((equal "favourite" toot-type) - (error "Your can't %s favourites." action-string)) + (error "Your can't %s favourites" action-string)) (t (mastodon-toot--action action @@ -402,7 +403,7 @@ NO-REDRAFT means delete toot only." toot-cw))))))))) (defun mastodon-toot-set-cw (&optional cw) - "Set content warning to CW if it is non-nil" + "Set content warning to CW if it is non-nil." (unless (equal cw "") (setq mastodon-toot--content-warning t) (setq mastodon-toot--content-warning-from-reply-or-redraft cw))) |