diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-profile.el | 19 | ||||
-rw-r--r-- | lisp/mastodon-tl.el | 2 |
2 files changed, 10 insertions, 11 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index b15b4bb..b0b3e0e 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -169,15 +169,14 @@ NO-REBLOGS means do not display boosts in statuses." (defun mastodon-profile--account-view-cycle () "Cycle through profile view: toots, followers, and following." (interactive) - (let ((endpoint (plist-get mastodon-tl--buffer-spec 'endpoint))) - (cond ((string-suffix-p "statuses" endpoint) - (mastodon-profile--open-followers)) - ((string-suffix-p "followers" endpoint) - (mastodon-profile--open-following)) - ((string-suffix-p "following" endpoint) - (mastodon-profile--open-statuses-no-reblogs)) - (t - (mastodon-profile--make-author-buffer mastodon-profile--account))))) + (cond ((mastodon-tl--buffer-type-eq 'profile-statuses) + (mastodon-profile--open-followers)) + ((mastodon-tl--buffer-type-eq 'profile-followers) + (mastodon-profile--open-following)) + ((mastodon-tl--buffer-type-eq 'profile-following) + (mastodon-profile--open-statuses-no-reblogs)) + (t + (mastodon-profile--make-author-buffer mastodon-profile--account)))) (defun mastodon-profile--open-statuses-no-reblogs () "Open a profile buffer showing statuses without reblogs." @@ -761,7 +760,7 @@ IMG_TYPE is the JSON key from the account data." "Query for USER-HANDLE from current status and show that user's profile." (interactive (list - (if (and (not (string-prefix-p "accounts" (mastodon-tl--get-endpoint))) ;profile view + (if (and (not (mastodon-tl--profile-buffer-p)) (not (get-text-property (point) 'toot-json))) (message "Looks like there's no toot or user at point?") (let ((user-handles (mastodon-profile--extract-users-handles diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 96b8311..2a20e73 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1733,7 +1733,7 @@ Note that you can only (un)mute threads you have posted in." "Mute a thread. If UNMUTE, unmute it." (let ((endpoint (mastodon-tl--get-endpoint))) - (if (string-suffix-p "context" endpoint) ; thread view + (if (mastodon-tl--buffer-type-eq 'thread) (let* ((id (save-match-data (string-match "statuses/\\(?2:[[:digit:]]+\\)/context" |