aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-11 21:22:26 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-11-11 21:22:26 +0100
commit6f64edff983daa8ab67283b8271c4dc0d36e9bd2 (patch)
tree108e52cfed6515b59150c1805caa3bd0016a6e87 /lisp
parent606fbfc26a620f76bedea1d7bf033aea9690ead5 (diff)
mastodon-toot-empty-p: count polls as non empty toot
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-toot.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index f6a0f0a..86d3792 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -503,11 +503,12 @@ Pushes `mastodon-toot-current-toot-text' to
(message "Draft saved!")))
(defun mastodon-toot-empty-p (&optional text-only)
- "Return t if no text or attachments have been added to the compose buffer.
+ "Return t if no text, attachments, or polls have been added to the compose buffer.
TEXT-ONLY means don't check for attachments."
(and (if text-only
t
- (not mastodon-toot--media-attachments))
+ (not mastodon-toot--media-attachments)
+ (not mastodon-toot-poll))
(string-empty-p (mastodon-tl--clean-tabs-and-nl
(mastodon-toot--remove-docs)))))