aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-tl.el
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2021-09-23 11:41:35 +0200
committermousebot <mousebot@riseup.net>2021-09-23 11:41:35 +0200
commitf0822a697317e2e8bf320540e7ae1c80163bc90f (patch)
tree188da44e51d4630bfac327826d5412b0f8deff57 /lisp/mastodon-tl.el
parent7bfcc9909ad7282ac41eb85b013a3845028aa531 (diff)
on delete toot, redraw current timeline or profile
Diffstat (limited to 'lisp/mastodon-tl.el')
-rw-r--r--lisp/mastodon-tl.el15
1 files changed, 15 insertions, 0 deletions
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)