From 7043349b2a5bbb621712fe596086f3d82b65a580 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 6 Aug 2024 10:18:12 +0200 Subject: views add account to list: unless handle clauses to prevent unneeded requests --- lisp/mastodon-views.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/mastodon-views.el b/lisp/mastodon-views.el index e956ccd..5ec2642 100644 --- a/lisp/mastodon-views.el +++ b/lisp/mastodon-views.el @@ -393,8 +393,11 @@ If ACCOUNT-ID and HANDLE are provided use them rather than prompting." (completing-read list-prompt (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 (mastodon-tl--map-alist-vals-to-alist 'acct 'id followings)) + (followings (unless handle + (mastodon-views--get-users-followings))) + (handles (unless handle + (mastodon-tl--map-alist-vals-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))) -- cgit v1.2.3