aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-09 21:23:22 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-10 13:04:15 +0100
commit3ca11d498d1bf386ce302972c202a6222128534d (patch)
tree03e0c3b6b6ac7a6276e016ab89cae8522ae3648b /lisp/mastodon-toot.el
parentdc05ae39d5044d79d8288b36a71f90dba4b85724 (diff)
masto-toot-mode-hook - only fetch acc settings if not set
the idea is to be able to start composing a toot without making any unnecessary requests. masto-mode-hook still always fetches (in case settings changed elsewhere). and we always fetch when we change a setting.
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 7a40354..30f4a25 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -78,6 +78,7 @@
(autoload 'mastodon-profile--update-preference "mastodon-profile")
(autoload 'mastodon-profile-fetch-server-account-settings "mastodon-profile")
(autoload 'mastodon-tl--render-text "mastodon-tl")
+(autoload 'mastodon-profile-fetch-server-account-settings-maybe "mastodon-profile")
;; for mastodon-toot--translate-toot-text
(autoload 'mastodon-tl--content "mastodon-tl")
@@ -1284,7 +1285,7 @@ a draft into the buffer."
(insert initial-text))))
;;;###autoload
-(add-hook 'mastodon-toot-mode-hook #'mastodon-profile-fetch-server-account-settings)
+(add-hook 'mastodon-toot-mode-hook #'mastodon-profile-fetch-server-account-settings-maybe)
(define-minor-mode mastodon-toot-mode
"Minor mode to capture Mastodon toots."