diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-08 19:52:00 +0200 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-05-08 19:52:00 +0200 |
commit | 6493d0dec1cc311ade347327c2b8f9656779abba (patch) | |
tree | 805fc1780e1047e1f72d82a71c382ac6013c5ee6 | |
parent | 549cca828aeb92e882b09346e2ccbb60a3fe9faf (diff) |
semi-refactor mastodon-profile--toggle-account-key
-rw-r--r-- | lisp/mastodon-profile.el | 9 |
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." |