diff options
author | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-18 22:17:45 +0100 |
---|---|---|
committer | marty hiatt <martianhiatus [a t] riseup [d o t] net> | 2023-03-19 13:21:37 +0100 |
commit | 5d62213b4f8f92cb974c24c4ab0fc373fe806115 (patch) | |
tree | baf36c533fe7e81538c7428408266a6026401b78 /lisp/mastodon-views.el | |
parent | d6470dd725c0da74345e1ed8bf40822730e0c004 (diff) |
refactor tl--map-alist-to-alist
Diffstat (limited to 'lisp/mastodon-views.el')
-rw-r--r-- | lisp/mastodon-views.el | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index f92a9aa..d3865bc 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -398,10 +398,7 @@ If ACCOUNT-ID and HANDLE are provided use them rather than prompting." (mastodon-views--get-lists-names) nil t))) (list-id (or id (mastodon-views--get-list-id list-name))) (followings (mastodon-views--get-users-followings)) - (handles (mapcar (lambda (x) - (cons (alist-get 'acct x) - (alist-get 'id x))) - followings)) + (handles (mastodon-tl-map-alist-to-alist 'acct 'id followings)) (account (or handle (completing-read "Account to add: " handles nil t))) (account-id (or account-id (alist-get account handles nil nil 'equal))) @@ -437,10 +434,7 @@ If ID is provided, use that list." (mastodon-views--get-lists-names) nil t))) (list-id (or id (mastodon-views--get-list-id list-name))) (accounts (mastodon-views--accounts-in-list list-id)) - (handles (mapcar (lambda (x) - (cons (alist-get 'acct x) - (alist-get 'id x))) - accounts)) + (handles (mastodon-tl-map-alist-to-alist 'acct 'id accounts)) (account (completing-read "Account to remove: " handles nil t)) (account-id (alist-get account handles nil nil 'equal)) |