aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-toot.el15
-rw-r--r--lisp/mastodon-transient.el7
2 files changed, 16 insertions, 6 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
diff --git a/lisp/mastodon-transient.el b/lisp/mastodon-transient.el
index 4776c4b..f418fcc 100644
--- a/lisp/mastodon-transient.el
+++ b/lisp/mastodon-transient.el
@@ -337,9 +337,10 @@ Pull value from `mastodon-tool-poll' if possible.'"
(if (not value)
""
(let ((readable
- (car
- (rassoc value
- (mastodon-toot--poll-expiry-options-alist)))))
+ (or (car
+ (rassoc value
+ (mastodon-toot--poll-expiry-options-alist)))
+ (concat value " secs")))) ;; editing a poll wont match expiry list
(propertize readable
'face (if (tp-arg-changed-p obj cons)
'transient-value