aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-03-21 16:04:45 +0100
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-03-21 16:04:45 +0100
commite80ebfec55a0c284d0eef7248abcca91d0d4d4e5 (patch)
tree1fe28dcce7c7de6d799797a9a556b4cae87416c2 /lisp
parent21caf882946086ecf61e6ad9c911abbc35d2ad72 (diff)
fix acccount-view-cycle and tl--get-buffer-type to handle profile views sans boosts
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-profile.el6
-rw-r--r--lisp/mastodon-tl.el22
2 files changed, 16 insertions, 12 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 9030d97..6c9a850 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -142,15 +142,15 @@ NO-REBLOGS means do not display boosts in statuses."
;; TODO: we shd just load all views' data then switch coz this is slow af:
(defun mastodon-profile--account-view-cycle ()
- "Cycle through profile view: toots, followers, and following."
+ "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-followers))
((mastodon-tl--buffer-type-eq 'profile-followers)
(mastodon-profile--open-following))
((mastodon-tl--buffer-type-eq 'profile-following)
- (mastodon-profile--open-statuses-no-reblogs))
- (t
(mastodon-profile--make-author-buffer mastodon-profile--account))))
(defun mastodon-profile--open-statuses-no-reblogs ()
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 0ee4a65..db1e40e 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1425,7 +1425,7 @@ Note that for many buffers, this requires `mastodon-tl--buffer-spec'
to be set. It is set for almost all buffers, but you still have to
call this function after it is set or use something else."
(let ((endpoint-fun (mastodon-tl--get-endpoint nil :no-error))
- (buffer-name-fun (mastodon-tl--buffer-name nil :no-error)))
+ (buffer-name (mastodon-tl--buffer-name nil :no-error)))
(cond (mastodon-toot-mode
;; composing/editing:
(if (string= "*edit toot*" (buffer-name))
@@ -1434,7 +1434,7 @@ call this function after it is set or use something else."
;; main timelines:
((string= "timelines/home" endpoint-fun)
'home)
- ((string= "*mastodon-local*" buffer-name-fun)
+ ((string= "*mastodon-local*" buffer-name)
'local)
((string= "timelines/public" endpoint-fun)
'federated)
@@ -1443,7 +1443,7 @@ call this function after it is set or use something else."
((string-prefix-p "timelines/list/" endpoint-fun)
'list-timeline)
;; notifs:
- ((string-suffix-p "mentions*" buffer-name-fun)
+ ((string-suffix-p "mentions*" buffer-name)
'mentions)
((string= "notifications" endpoint-fun)
'notifications)
@@ -1456,13 +1456,17 @@ call this function after it is set or use something else."
((mastodon-tl--profile-buffer-p)
(cond
;; own profile:
- ((equal (mastodon-tl--buffer-name)
- (concat "*mastodon-" (mastodon-auth--get-account-name) "-statuses*"))
- 'own-profile)
+ ;; perhaps not needed, and needlessly confusing,
+ ;; e.g. for `mastodon-profile--account-view-cycle':
+ ;; ((equal (mastodon-tl--buffer-name)
+ ;; (concat "*mastodon-" (mastodon-auth--get-account-name) "-statuses*"))
+ ;; 'own-profile-statuses)
;; profile note:
- ((string-suffix-p "update-profile*" buffer-name-fun)
+ ((string-suffix-p "update-profile*" buffer-name)
'update-profile-note)
- ;; posts
+ ;; posts inc. boosts:
+ ((string-suffix-p "no-boosts*" buffer-name)
+ 'profile-statuses-no-boosts)
((string-suffix-p "statuses" endpoint-fun)
'profile-statuses)
;; profile followers
@@ -1496,7 +1500,7 @@ call this function after it is set or use something else."
;; instance description
((string= "instance" endpoint-fun)
'instance-description)
- ((string= "*mastodon-toot-edits*" buffer-name-fun)
+ ((string= "*mastodon-toot-edits*" buffer-name)
'toot-edits))))
(defun mastodon-tl--buffer-type-eq (type)