aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2022-02-15 17:07:01 +0100
committermousebot <mousebot@riseup.net>2022-02-15 19:38:21 +0100
commit0be1c740ba3f4f3f86a3d81567fcb5cd1b9683a9 (patch)
tree5000264da717d2c0d135e402a2625617b74a9075
parent7058db5848987df4c089bd0c0e34813f830d372c (diff)
invert if call in filters insert
-rw-r--r--lisp/mastodon-tl.el21
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 34b2881..e8634dd 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1168,17 +1168,16 @@ JSON is what is returned by by the server."
(mastodon-tl--set-face
"[c - create filter\n d - delete filter at point\n n/p - go to next/prev filter]\n\n"
'font-lock-comment-face))
- (if (not (equal json '[]))
- (progn
- (mapc (lambda (x)
- (mastodon-tl--insert-filter-string x)
- (insert "\n\n"))
- json))
- (insert (propertize
- "Looks like you have no filters for now."
- 'face font-lock-comment-face
- 'byline t
- 'toot-id "0")))) ; so point can move here when no filters
+ (if (equal json '[])
+ (insert (propertize
+ "Looks like you have no filters for now."
+ 'face font-lock-comment-face
+ 'byline t
+ 'toot-id "0")) ; so point can move here when no filters
+ (mapc (lambda (x)
+ (mastodon-tl--insert-filter-string x)
+ (insert "\n\n"))
+ json)))
(defun mastodon-tl--insert-filter-string (filter)
"Insert a single FILTER."