[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mastodon 3303e85db9 11/45: display a POLL flag in compose
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mastodon 3303e85db9 11/45: display a POLL flag in compose buffer. |
Date: |
Mon, 24 Jun 2024 10:01:50 -0400 (EDT) |
branch: elpa/mastodon
commit 3303e85db950578d667bc686af7f866a60ba0ec1
Author: marty hiatt <martianhiatus@riseup.net>
Commit: marty hiatt <martianhiatus@riseup.net>
display a POLL flag in compose buffer.
next step: display/edit/cancel polls
---
lisp/mastodon-toot.el | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el
index aaff19bb41..d21084b433 100644
--- a/lisp/mastodon-toot.el
+++ b/lisp/mastodon-toot.el
@@ -1387,7 +1387,8 @@ MAX is the maximum number set by their instance."
(setq mastodon-toot-poll
`(:options ,options :length ,length :multi ,multiple-p
:hide ,hide-totals :expiry ,expiry))
- (message "poll created!")))
+ (message "poll created!")
+ (mastodon-toot--update-status-fields)))
(defun mastodon-toot--read-poll-options (count length)
"Read a list of options for poll with COUNT options.
@@ -1609,6 +1610,9 @@ REPLY-TEXT is the text of the toot being replied to."
(propertize "CW"
'toot-post-cw-flag t)
" "
+ (propertize "POLL"
+ 'toot-post-poll-flag t)
+ " "
(propertize "NSFW"
'toot-post-nsfw-flag t)
"\n"
@@ -1700,6 +1704,8 @@ REPLY-REGION is a string to be injected into the buffer."
(point-min)))
(scheduled-region (mastodon-tl--find-property-range
'toot-post-scheduled
(point-min)))
+ (poll-region (mastodon-tl--find-property-range 'toot-post-poll-flag
+ (point-min)))
(toot-string (buffer-substring-no-properties (cdr header-region)
(point-max))))
(add-text-properties (car count-region) (cdr count-region)
@@ -1731,11 +1737,16 @@ REPLY-REGION is a string to be injected into the
buffer."
(add-text-properties (car nsfw-region) (cdr nsfw-region)
(list 'display (if mastodon-toot--content-nsfw
(if
mastodon-toot--media-attachments
- "NSFW" "NSFW (for
attachments only)")
+ "NSFW" "NSFW (attachments
only)")
"")
'face 'mastodon-cw-face))
+ (add-text-properties (car poll-region) (cdr poll-region)
+ (list 'display (if mastodon-toot-poll "POLL" "")
+ 'face 'mastodon-cw-face))
(add-text-properties (car cw-region) (cdr cw-region)
- (list 'invisible (not
mastodon-toot--content-warning)
+ (list 'display (if mastodon-toot--content-warning
+ "CW"
+ " ") ;; hold the blank space
'face 'mastodon-cw-face)))))
(defun mastodon-toot--count-toot-chars (toot-string &optional cw)
- [nongnu] elpa/mastodon updated (40971e1f1f -> c148911513), ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 2b426fb913 02/45: working max-id arg for hometimeline/reload, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 9239f65226 07/45: set max-id in buffer spec also after reloading, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon de2937d9fa 12/45: poll not toot arg for format-poll, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 4aad54dcdf 10/45: get-poll > format-poll, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon ddcaf0e1b2 01/45: add max-id to buffer-spec, and set when calling tl--more, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 373d19b6cc 15/45: display poll deets in help-echo for display fields flag., ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon a1667687e3 18/45: index, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 3303e85db9 11/45: display a POLL flag in compose buffer.,
ELPA Syncer <=
- [nongnu] elpa/mastodon 06627d5d3d 04/45: max-id arg for other -tl.el timelines, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 13162773b6 06/45: max-id arg/params for (so far only plain) profile view, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 638045a2b2 29/45: add remove-overlays to with-mastodon-buffer macro, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 073ef68683 05/45: max-id arg/param for notifs-get, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 06cbc031c7 03/45: index, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon f4a4d31f29 09/45: Merge branch 'reload-paginate' into develop, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon b4fc0f52b8 19/45: refactor apply status fields props, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 4d49c35380 24/45: fix sensitive prop test: json-false or t!, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 901da7f722 36/45: with-mastodon-buffer : switch buffer after body, ELPA Syncer, 2024/06/24
- [nongnu] elpa/mastodon 73d91dd163 32/45: add check to sensitive media toggle, ELPA Syncer, 2024/06/24