[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/mastodon 2cfaf7458c 01/18: prefix for profile cycle comple
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/mastodon 2cfaf7458c 01/18: prefix for profile cycle completing-read. FIX #624. |
Date: |
Mon, 2 Dec 2024 16:00:32 -0500 (EST) |
branch: elpa/mastodon
commit 2cfaf7458c489b6a639bab2c616c64d90eda7f34
Author: marty hiatt <martianhiatus@disroot.org>
Commit: marty hiatt <martianhiatus@disroot.org>
prefix for profile cycle completing-read. FIX #624.
---
lisp/mastodon-profile.el | 43 +++++++++++++++++++++++++++++--------------
1 file changed, 29 insertions(+), 14 deletions(-)
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index a94fd16423..acbc206cdb 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -163,22 +163,37 @@ MAX-ID is a flag to include the max_id pagination
parameter."
;;; PROFILE VIEW COMMANDS
+(defvar mastodon-profile--account-view-alist
+ '(("statuses" . mastodon-profile--open-statuses)
+ ("no boosts" . mastodon-profile--open-statuses-no-reblogs)
+ ("no replies" . mastodon-profile--open-statuses-no-replies)
+ ("only media" . mastodon-profile--open-statuses-only-media)
+ ("followers" . mastodon-profile--open-followers)
+ ("following" . mastodon-profile--open-following)))
+
;; TODO: we shd just load all views' data then switch coz this is slow af:
-(defun mastodon-profile--account-view-cycle ()
+(defun mastodon-profile--account-view-cycle (&optional prefix)
"Cycle through profile view: toots, toot sans boosts, followers, and
following."
- (interactive)
- (cond ((mastodon-tl--buffer-type-eq 'profile-statuses)
- (mastodon-profile--open-statuses-no-reblogs))
- ((mastodon-tl--buffer-type-eq 'profile-statuses-no-boosts)
- (mastodon-profile--open-statuses-no-replies))
- ((mastodon-tl--buffer-type-eq 'profile-statuses-no-replies)
- (mastodon-profile--open-statuses-only-media))
- ((mastodon-tl--buffer-type-eq 'profile-statuses-only-media)
- (mastodon-profile--open-followers))
- ((mastodon-tl--buffer-type-eq 'profile-followers)
- (mastodon-profile--open-following))
- ((mastodon-tl--buffer-type-eq 'profile-following)
- (mastodon-profile--make-author-buffer mastodon-profile--account))))
+ (interactive "P")
+ (if prefix
+ (let* ((choice
+ (completing-read "Profile view:"
+ mastodon-profile--account-view-alist))
+ (fun (alist-get choice mastodon-profile--account-view-alist
+ nil nil #'equal)))
+ (funcall fun))
+ (cond ((mastodon-tl--buffer-type-eq 'profile-statuses)
+ (mastodon-profile--open-statuses-no-reblogs))
+ ((mastodon-tl--buffer-type-eq 'profile-statuses-no-boosts)
+ (mastodon-profile--open-statuses-no-replies))
+ ((mastodon-tl--buffer-type-eq 'profile-statuses-no-replies)
+ (mastodon-profile--open-statuses-only-media))
+ ((mastodon-tl--buffer-type-eq 'profile-statuses-only-media)
+ (mastodon-profile--open-followers))
+ ((mastodon-tl--buffer-type-eq 'profile-followers)
+ (mastodon-profile--open-following))
+ ((mastodon-tl--buffer-type-eq 'profile-following)
+ (mastodon-profile--open-statuses)))))
(defun mastodon-profile--open-statuses ()
"Open a profile showing statuses."
- [nongnu] elpa/mastodon updated (cf64163130 -> 10be1f9c28), ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 2cfaf7458c 01/18: prefix for profile cycle completing-read. FIX #624.,
ELPA Syncer <=
- [nongnu] elpa/mastodon 7b98a4ca2a 02/18: notifs: typo in fun name prefix, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 7bc28cc75f 12/18: add prefix and view check to notif cycle, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 12d174dfd3 06/18: thread-do on reload after reply and bookmark load. FIX #625, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon a472f873a3 09/18: add widget to notifs view., ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 1545f3b78e 05/18: get-toot-author: never get booster profile. #630., ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon e9f77777dd 11/18: add cycle notif function. FIX #628., ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 10be1f9c28 18/18: Merge branch 'develop', ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 95d06a03eb 15/18: flycheck notifs.el, ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon 241d26dc1f 10/18: notif types: use types[] not exclude_types[], ELPA Syncer, 2024/12/02
- [nongnu] elpa/mastodon be4a64a4ff 13/18: index, ELPA Syncer, 2024/12/02