From f0822a697317e2e8bf320540e7ae1c80163bc90f Mon Sep 17 00:00:00 2001 From: mousebot Date: Thu, 23 Sep 2021 11:41:35 +0200 Subject: on delete toot, redraw current timeline or profile --- lisp/mastodon-tl.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lisp/mastodon-tl.el') diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el index d1e82d7..6304284 100644 --- a/lisp/mastodon-tl.el +++ b/lisp/mastodon-tl.el @@ -1054,6 +1054,21 @@ webapp" (message "User %s (@%s) unblocked!" name user-handle))))) (message "Cannot find a user with handle %S" user-handle)))) +(defun mastodon-tl--reload-timeline-or-profile () + "Reload the current timeline or profile page. +For use after e.g. deleting a toot." + (cond ((equal (mastodon-tl--get-endpoint) "timelines/home") + (mastodon-tl--get-home-timeline)) + ((equal (mastodon-tl--get-endpoint) "timelines/public") + (mastodon-tl--get-federated-timeline)) + ((equal (mastodon-tl--get-endpoint) "timelines/public?local=true") + (mastodon-tl--get-local-timeline)) + ((equal (mastodon-tl--get-endpoint) "notifications") + (mastodon-notifications--get)) + ((equal (mastodon-tl--buffer-name) + (concat "*mastodon-" (mastodon-auth--get-account-name) "-statuses*")) + (mastodon-profile--my-profile)))) + (defun mastodon-tl--more () "Append older toots to timeline." (interactive) -- cgit v1.2.3