aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-09 20:21:18 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-09 20:21:18 +0200
commit641e0ca808edd6584d12dfbc1f53fc992efd7a19 (patch)
treecd326b1a631c947a2f279b96dc0564b1bcc0161f
parent1bebf7abc2b9487eeed847c0be1ec804a856b306 (diff)
refactor a profile-note-p in view instance descript
-rw-r--r--lisp/mastodon-views.el18
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el
index 3ee68d9..41f68b8 100644
--- a/lisp/mastodon-views.el
+++ b/lisp/mastodon-views.el
@@ -750,18 +750,16 @@ INSTANCE is an instance domain name."
(account (or (alist-get 'account reblog)
(alist-get 'account toot)
toot)) ; else `toot' is already an account listing.
- ;; we can't use --profile-buffer-p as our test here because we may
- ;; be looking at toots/boosts/users in a profile buffer.
- ;; profile-json works as a defacto test for if point is on the
- ;; profile details at the top of a profile buffer.
- (url (if (and (mastodon-tl--profile-buffer-p)
- ;; only call this in profile buffers:
- (mastodon-tl--property 'profile-json))
+ ;; we may be at toots/boosts/users in a profile buffer.
+ ;; profile-json is a defacto test for if point is on the profile
+ ;; details at the top of a profile buffer.
+ (profile-note-p (and (mastodon-tl--profile-buffer-p)
+ ;; only call this in profile buffers:
+ (mastodon-tl--property 'profile-json)))
+ (url (if profile-note-p
(alist-get 'url toot) ; profile description
(alist-get 'url account)))
- (username (if (and (mastodon-tl--profile-buffer-p)
- ;; only call this in profile buffers:
- (mastodon-tl--property 'profile-json))
+ (username (if profile-note-p
(alist-get 'username toot) ;; profile
(alist-get 'username account)))
(instance (mastodon-views--get-instance-url url username instance))