aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-06 14:40:28 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2023-05-06 14:40:28 +0200
commit4a4eaa48557c50c393af2a0b499023fad4474a24 (patch)
tree191b8e112e5cc1be1bee744720259ee6220d0067
parentc7446f48e5e8378a2240959dbf7fcd66a7de44e7 (diff)
init* reorder attempt to fix
-rw-r--r--lisp/mastodon-tl.el52
1 files changed, 26 insertions, 26 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 7d48c12..cef995d 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -2579,34 +2579,34 @@ RESPONSE is the data returned from the server by
JSON and http headers, without it just the JSON."
(let ((json (if headers (car response) response)))
(if (not json) ; praying this is right here, else try "\n[]"
- (message "Looks like nothing returned from endpoint: %s" endpoint)
+ (message "Looks like nothing returned from endpoint: %s" endpoint)
(let* ((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
- update-params
- hide-replies)
- (setq
- ;; Initialize with a minimal interval; we re-scan at least once
- ;; every 5 minutes to catch any timestamps we may have missed
- mastodon-tl--timestamp-next-update (time-add (current-time)
- (seconds-to-time 300)))
- (funcall update-function json)
- (setq mastodon-tl--timestamp-update-timer
- (when mastodon-tl--enable-relative-timestamps
- (run-at-time (time-to-seconds
- (time-subtract mastodon-tl--timestamp-next-update
- (current-time)))
- nil ;; don't repeat
- #'mastodon-tl--update-timestamps-callback
- (current-buffer)
- nil)))
- (unless (mastodon-tl--profile-buffer-p)
- (mastodon-tl--goto-first-item)))))))
+ (with-mastodon-buffer buffer
+ #'mastodon-mode nil
+ (mastodon-tl--set-buffer-spec buffer
+ endpoint
+ update-function
+ link-header
+ update-params
+ hide-replies)
+ (funcall update-function json)
+ (setq
+ ;; Initialize with a minimal interval; we re-scan at least once
+ ;; every 5 minutes to catch any timestamps we may have missed
+ mastodon-tl--timestamp-next-update (time-add (current-time)
+ (seconds-to-time 300)))
+ (setq mastodon-tl--timestamp-update-timer
+ (when mastodon-tl--enable-relative-timestamps
+ (run-at-time (time-to-seconds
+ (time-subtract mastodon-tl--timestamp-next-update
+ (current-time)))
+ nil ;; don't repeat
+ #'mastodon-tl--update-timestamps-callback
+ (current-buffer)
+ nil)))
+ (unless (mastodon-tl--profile-buffer-p)
+ (mastodon-tl--goto-first-item)))))))
(defun mastodon-tl--init-sync (buffer-name endpoint update-function &optional note-type)
"Initialize BUFFER-NAME with timeline targeted by ENDPOINT.