aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-14 20:18:38 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-10-14 20:18:57 +0200
commit0fc64df90d9cb8ccb6b1968e0dc36ece6c9b639c (patch)
tree139c24408e123ab613eed00d49189ac0f6599460 /lisp/mastodon-tl.el
parent6d80f5b2d2dd71a0e28a7bcb700e8fb1757ac8d6 (diff)
fix minor-view disaster disastrously: put it all init-sync
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el15
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index d5d127d..47824c0 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -2656,8 +2656,9 @@ JSON and http headers, without it just the JSON."
link-header update-params hide-replies)
(mastodon-tl--do-init json update-function))))))
-(defun mastodon-tl--init-sync (buffer-name endpoint update-function
- &optional note-type params headers)
+(defun mastodon-tl--init-sync
+ (buffer-name endpoint update-function
+ &optional note-type params headers view-name binding-str)
"Initialize BUFFER-NAME with timeline targeted by ENDPOINT.
UPDATE-FUNCTION is used to receive more toots.
Runs synchronously.
@@ -2676,7 +2677,15 @@ Optional arg NOTE-TYPE means only get that type of note."
(headers (if headers (cdr response) nil))
(link-header (mastodon-tl--get-link-header-from-response headers)))
(with-mastodon-buffer buffer #'mastodon-mode nil
- (mastodon-tl--set-buffer-spec buffer endpoint update-function link-header params)
+ ;; insert view-name/ heading-str
+ (when view-name
+ (mastodon-search--insert-heading view-name))
+ (when binding-str
+ (insert (mastodon-tl--set-face (concat "[" binding-str "]\n\n")
+ 'font-lock-comment-face)))
+
+ (mastodon-tl--set-buffer-spec buffer endpoint update-function
+ link-header params)
(mastodon-tl--do-init json update-function)
buffer)))