diff options
author | marty hiatt <martianhiatus@riseup.net> | 2024-08-06 17:53:47 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus@riseup.net> | 2024-08-06 17:53:47 +0200 |
commit | 994b4e9a938d17d35462a8da3929fea267563c70 (patch) | |
tree | ad8e7d6365f1210229ad582a30987d11cb4f24e6 /lisp/mastodon-profile.el | |
parent | 20d0f4ae848a2b8bc3bf8a63c409871d0e7991ff (diff) |
re-write all (if x y "") clauses as (when x y), if poss.
we can use when inside concat, but not inside insert, nor in strings/args headed for
format or propertize.
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r-- | lisp/mastodon-profile.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 8249641..0a17a25 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -681,18 +681,16 @@ MAX-ID is a flag to include the max_id pagination parameter." (mastodon-profile--render-roles .roles))) "\n" (propertize (concat "@" .acct) 'face 'default) - (if (eq .locked t) - (concat " " (mastodon-tl--symbol 'locked)) - "") + (when (eq .locked t) + (concat " " (mastodon-tl--symbol 'locked))) "\n " mastodon-tl--horiz-bar "\n" ;; profile note: (mastodon-tl--render-text .note account) ; account = tab-stops in profile ;; meta fields: - (if fields - (concat "\n" (mastodon-tl--set-face - (mastodon-profile--fields-insert fields) - 'success)) - "") + (when fields + (concat "\n" (mastodon-tl--set-face + (mastodon-profile--fields-insert fields) + 'success))) "\n" ;; Joined date: (propertize |