aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-toot.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@disroot.org>2024-10-24 10:40:29 +0200
committermarty hiatt <martianhiatus@disroot.org>2024-10-24 10:40:29 +0200
commit37a76491311fe1f6852be9ef6c683d3cbd1655a7 (patch)
tree86174d4dc28af2832ace157d9ac40f26e2ddef0f /lisp/mastodon-toot.el
parent99da98a03519d08ab0779d5b21e04760848ae87d (diff)
poll: set tp-transient-settings on editing a toot
Diffstat (limited to 'lisp/mastodon-toot.el')
-rw-r--r--lisp/mastodon-toot.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index 35124ea..bd62728 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1510,9 +1510,18 @@ Sets `mastodon-toot-poll' to nil."
(mastodon-tl--human-duration expiry-seconds-rel)))
(options (mastodon-tl--map-alist 'title .options))
(multiple (if (eq :json-false .multiple) nil t)))
- (setq mastodon-toot-poll
- `( :options ,options :expiry-readable ,expiry-human
- :expiry ,expiry-str :multi ,multiple)))))
+ (if mastodon-toot-poll-use-transient
+ (setq tp-transient-settings
+ `((multi . ,multiple)
+ (expiry . ,expiry-str)
+ ;; (hide . ,hide)
+ (one . ,(nth 0 options))
+ (two . ,(nth 1 options))
+ (three . ,(nth 2 options))
+ (four . ,(nth 3 options))))
+ (setq mastodon-toot-poll
+ `( :options ,options :expiry-readable ,expiry-human
+ :expiry ,expiry-str :multi ,multiple))))))
;;; SCHEDULE