aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-12 17:30:00 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-12 17:30:00 +0200
commit6691dab7aa4372192ca23cdbef2ff5c98b9e69b7 (patch)
tree01d2f3d57074ee55aa438824d9f5f66caec2c746 /lisp
parent3c3ea71707d086858c141d141c2ec964d0782a2a (diff)
handle search type buffers in buffer-type
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-tl.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index cdc06c9..25ffcd7 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1573,8 +1573,13 @@ call this function after it is set or use something else."
((mastodon-tl--endpoint-str-= "preferences")
'preferences)
;; search
- ((mastodon-tl--endpoint-str-= "search" :suffix)
- 'search)
+ ((mastodon-tl--search-buffer-p)
+ (cond ((equal (mastodon-search--buf-type) "accounts")
+ 'search-accounts)
+ ((equal (mastodon-search--buf-type) "hashtags")
+ 'search-hashtags)
+ ((equal (mastodon-search--buf-type) "statuses")
+ 'search-statuses)))
;; trends
((mastodon-tl--endpoint-str-= "api/v1/trends/statuses")
'trending-statuses)
@@ -1612,6 +1617,10 @@ call this function after it is set or use something else."
This includes the update profile note buffer, but not the preferences one."
(string-prefix-p "accounts" (mastodon-tl--endpoint nil :no-error)))
+(defun mastodon-tl--search-buffer-p ()
+ "T if current buffer is a search buffer."
+ (string-suffix-p "search" (mastodon-tl--endpoint nil :no-error)))
+
(defun mastodon-tl--timeline-proper-p ()
"Return non-nil if the current buffer is a \"proper\" timeline.
A proper timeline excludes notifications, threads, profiles, and