aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-09-11 13:47:27 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-09-11 13:47:27 +0200
commita986ec502a305a9a55311bec8956b1f0331d2b16 (patch)
tree84109b3f1c1b6ae73f762a39e88f7b7bc76b32da
parent5f9c329d6b8a8e309490b21c768cbfa8083d654e (diff)
re-fetch acc settings from server after toggle
-rw-r--r--lisp/mastodon-profile.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 87e00a4..e8b8622 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -273,7 +273,7 @@ SOURCE means that the preference is in the 'source' part of the account json."
(response (mastodon-http--patch url `((,pref-formatted ,val)))))
(mastodon-http--triage response
(lambda ()
- (mastodon-profile-update-preference-plist pref val)
+ (mastodon-profile-fetch-server-account-settings)
(message "Account setting %s updated to %s!" pref val)))))
(defun mastodon-profile--get-pref (pref)
@@ -284,8 +284,8 @@ SOURCE means that the preference is in the 'source' part of the account json."
"Set local account preference plist preference PREF to VAL.
This is done after changing the setting on the server."
;; TODO: convert all :json-false to nil and back again on sending
- ;; (let ((val (if (eql :json-false val) nil val)))
- (setf (plist-get mastodon-profile-account-settings pref) val))
+ (setq mastodon-profile-account-settings
+ (plist-put mastodon-profile-account-settings pref val)))
(defun mastodon-profile-fetch-server-account-settings ()
"Fetch basic account settings from the server.