diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-11-11 21:22:26 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2022-11-11 21:22:26 +0100 |
commit | 6f64edff983daa8ab67283b8271c4dc0d36e9bd2 (patch) | |
tree | 108e52cfed6515b59150c1805caa3bd0016a6e87 | |
parent | 606fbfc26a620f76bedea1d7bf033aea9690ead5 (diff) |
mastodon-toot-empty-p: count polls as non empty toot
-rw-r--r-- | lisp/mastodon-toot.el | 5 |
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))))) |