aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-profile.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-08 19:52:00 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-08 19:52:00 +0200
commit6493d0dec1cc311ade347327c2b8f9656779abba (patch)
tree805fc1780e1047e1f72d82a71c382ac6013c5ee6 /lisp/mastodon-profile.el
parent549cca828aeb92e882b09346e2ccbb60a3fe9faf (diff)
semi-refactor mastodon-profile--toggle-account-key
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r--lisp/mastodon-profile.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 8c55155..68d74df 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -394,11 +394,10 @@ Current settings are fetched from the server."
(mastodon-profile--get-source-value key)
(mastodon-profile--get-json-value key)))
(prompt (format "Account setting %s is %s. Toggle?" key val)))
- (if val
- (when (y-or-n-p prompt)
- (mastodon-profile--update-preference (symbol-name key) "false" source))
- (when (y-or-n-p prompt)
- (mastodon-profile--update-preference (symbol-name key) "true" source)))))
+ (when (y-or-n-p prompt)
+ (mastodon-profile--update-preference (symbol-name key)
+ (if val "false" "true")
+ source))))
(defun mastodon-profile--edit-string-value (key)
"Edit the string for account preference KEY."