From c1731fda740af4850109531b2fd1ebd9dee3a07d Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 14 Jan 2023 09:16:02 +0100 Subject: add fun --timeline-proper-p --- lisp/mastodon-tl.el | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lisp') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index 732e1c0..a240f67 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1485,6 +1485,13 @@ presume we are in a timline of toots or similar elements, such as ;; profile-followers profile following (member (mastodon-tl--get-buffer-type) toot-buffers))) +(defun mastodon-tl--timeline-proper-p () + "Return non-nil if the current buffer is a 'proper' timeline. +A proper timeline excludes notifications, threads, and other toot +buffers that aren't strictly mastodon timelines." + (let ((timeline-buffers '(home federated local tag-timeline profile-statuses))) + (member (mastodon-tl--get-buffer-type) timeline-buffers))) + (defun mastodon-tl--more-json (endpoint id) "Return JSON for timeline ENDPOINT before ID." (let* ((args `(("max_id" . ,(mastodon-tl--as-string id)))) -- cgit v1.2.3