[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mastodon f1bc8d83d4 35/52: display replies policy & exclus
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mastodon f1bc8d83d4 35/52: display replies policy & exclusive status for lists |
Date: |
Mon, 30 Oct 2023 16:01:31 -0400 (EDT) |
branch: elpa/mastodon
commit f1bc8d83d4a5fe324821ee890bf9dca6f05c6596
Author: marty hiatt <martianhiatus@riseup.net>
Commit: marty hiatt <martianhiatus@riseup.net>
display replies policy & exclusive status for lists
---
lisp/mastodon-views.el | 71 ++++++++++++++++++++++++++------------------------
1 file changed, 37 insertions(+), 34 deletions(-)
diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el
index d7d8e7e26d..6dfb8a2c25 100644
--- a/lisp/mastodon-views.el
+++ b/lisp/mastodon-views.el
@@ -207,41 +207,44 @@ provides the JSON data."
(defun mastodon-views--print-list-set (lists)
"Print each account plus a separator for each list in LISTS."
- (let ((lists-names (mastodon-tl--map-alist 'title lists)))
- (mapc (lambda (x)
- (mastodon-views--print-list-accounts x)
- (insert (propertize (concat " " mastodon-tl--horiz-bar "\n\n")
- 'face 'success)))
- lists-names)))
-
-(defun mastodon-views--print-list-accounts (list-name)
- "Insert the accounts in list named LIST-NAME."
- (let* ((id (mastodon-views--get-list-id list-name))
- (accounts (mastodon-views--accounts-in-list id)))
- (insert
- (propertize list-name
- 'byline t ; so we nav here
- 'item-id "0" ; so we nav here
- 'item-type 'user
- 'help-echo "RET: view list timeline, d: delete this list, \
+ (mapc (lambda (x)
+ (mastodon-views--print-list-accounts x)
+ (insert (propertize (concat " " mastodon-tl--horiz-bar "\n\n")
+ 'face 'success)))
+ lists))
+
+(defun mastodon-views--print-list-accounts (list)
+ "Insert the accounts in list named LIST, an alist."
+ (let-alist list
+ (let* ((accounts (mastodon-views--accounts-in-list .id)))
+ (insert
+ (propertize .title
+ 'byline t ; so we nav here
+ 'item-id "0" ; so we nav here
+ 'item-type 'user
+ 'help-echo "RET: view list timeline, d: delete this list, \
a: add account to this list, r: remove account from this list"
- 'list t
- 'face 'link
- 'keymap mastodon-views--list-name-keymap
- 'list-name list-name
- 'list-id id)
- (propertize "\n\n"
- 'list t
- 'keymap mastodon-views--list-name-keymap
- 'list-name list-name
- 'list-id id)
- (propertize
- (mapconcat #'mastodon-search--propertize-user accounts
- " ")
- 'list t
- 'keymap mastodon-views--list-name-keymap
- 'list-name list-name
- 'list-id id))))
+ 'list t
+ 'face 'link
+ 'keymap mastodon-views--list-name-keymap
+ 'list-name .title
+ 'list-id .id)
+ (propertize (format " [replies: %s, exclusive %s]"
+ .replies_policy
+ (when (eq t .exclusive) "true"))
+ 'face 'font-lock-comment-face)
+ (propertize "\n\n"
+ 'list t
+ 'keymap mastodon-views--list-name-keymap
+ 'list-name .title
+ 'list-id .id)
+ (propertize
+ (mapconcat #'mastodon-search--propertize-user accounts
+ " ")
+ 'list t
+ 'keymap mastodon-views--list-name-keymap
+ 'list-name .title
+ 'list-id .id)))))
(defun mastodon-views--get-users-lists ()
"Get the list of the user's lists from the server."
- [nongnu] elpa/mastodon 0bd2bea47d 27/52: override shr-linkmap 'u' binding, to update. 'w' is copy-url already, (continued)
- [nongnu] elpa/mastodon 0bd2bea47d 27/52: override shr-linkmap 'u' binding, to update. 'w' is copy-url already, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon 78ff4a75ea 36/52: item-type list for list, not user (stray value), ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon 826c228d09 34/52: edit list: exclusive proper true/false strings, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon cf7b3710c6 48/52: Merge branch 'develop', ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon 1ce402833e 50/52: flychecks, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon a8c80d25b7 52/52: update cmd index, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon 7676946d83 51/52: update cmd index, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon e954ae162c 31/52: no y-or-n-p for (un)bookmarking, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon f7ec0268e0 32/52: FIX #502. add "exclusive" param to create/edit lists., ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon 47865bd215 30/52: tl--prev-toot-id: don't assume our funs return anything., ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon f1bc8d83d4 35/52: display replies policy & exclusive status for lists,
ELPA Syncer <=
- [nongnu] elpa/mastodon 3dc21b91b1 38/52: tl--update: add lists, and note abt what we shd actually do, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon 40e8123b84 47/52: Merge branch 'triage-response-data' into develop, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon e380f74a44 49/52: profile--item-json is no cmd, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon 5f237982e5 40/52: a quick hack to toggle display of a user's boosts in timeline. FIX# 503, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon 87a6bc9d7d 45/52: readme contributing, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon 31643d6f63 16/52: Merge branch 'minor-view' into develop, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon a53d9824fe 19/52: change some error calls to user-error calls, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon 4a9c2015ee 26/52: fix elpaignore, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon c3db1170e8 33/52: edit toot at point: do-if-item-strict, ELPA Syncer, 2023/10/30
- [nongnu] elpa/mastodon fd697f98c3 39/52: no more/update for filters view, ELPA Syncer, 2023/10/30