diff options
author | mousebot <mousebot@riseup.net> | 2022-02-15 15:06:39 +0100 |
---|---|---|
committer | mousebot <mousebot@riseup.net> | 2022-02-15 15:06:39 +0100 |
commit | 907991314d0f4e2b88eeb093a6222468e77c9068 (patch) | |
tree | 511a7cdca38b4a4da043671445b96a18a95ee6a7 /lisp | |
parent | 0b01efc1187ca5d40839c8eed2d9ae7ddef144f7 (diff) |
improve use of goto-next-toot on timeline loading
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mastodon-tl.el | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 32bb73e..efccc21 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1459,7 +1459,6 @@ JSON is the data returned from the server." mastodon-tl--timestamp-next-update (time-add (current-time) (seconds-to-time 300))) (funcall update-function json)) - (mastodon-tl--goto-next-toot) (mastodon-mode) (when (equal endpoint "follow_requests") (mastodon-profile-mode) @@ -1477,7 +1476,11 @@ JSON is the data returned from the server." nil ;; don't repeat #'mastodon-tl--update-timestamps-callback (current-buffer) - nil))))) + nil))) + (when (or (equal endpoint "notifications") + (string-prefix-p "timelines" endpoint) + (string-prefix-p "statuses" endpoint)) + (mastodon-tl--goto-next-toot)))) (defun mastodon-tl--init-sync (buffer-name endpoint update-function) "Initialize BUFFER-NAME with timeline targeted by ENDPOINT. @@ -1509,7 +1512,11 @@ Runs synchronously." nil ;; don't repeat #'mastodon-tl--update-timestamps-callback (current-buffer) - nil)))) + nil))) + (when (or (equal endpoint "notifications") + (string-prefix-p "timelines" endpoint) + (string-prefix-p "statuses" endpoint)) + (mastodon-tl--goto-next-toot))) buffer)) (provide 'mastodon-tl) |