aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-10-19 21:55:39 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-10-19 21:56:54 +0200
commitcfe4703513dc574a58baf1fd7883082563bdbcc5 (patch)
treef39d942187af8495a882c6ba47278dab0d789074 /lisp
parent595ad8b8620a63b7ef5a7569bc6cb44675904051 (diff)
notifs: remove stale notifs code from tl--insert-status
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-notifications.el1
-rw-r--r--lisp/mastodon-tl.el24
2 files changed, 9 insertions, 16 deletions
diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index f163863..cb36616 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -46,7 +46,6 @@
(autoload 'mastodon-tl--find-property-range "mastodon-tl")
(autoload 'mastodon-tl--has-spoiler "mastodon-tl")
(autoload 'mastodon-tl--init "mastodon-tl")
-(autoload 'mastodon-tl--insert-status "mastodon-tl")
(autoload 'mastodon-tl--property "mastodon-tl")
(autoload 'mastodon-tl--reload-timeline-or-profile "mastodon-tl")
(autoload 'mastodon-tl--spoiler "mastodon-tl")
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 95632cd..5d0fafc 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -798,7 +798,9 @@ By default it is `mastodon-tl--byline-author'
DETAILED-P means display more detailed info. For now
this just means displaying toot client.
When DOMAIN, force inclusion of user's domain in their handle.
-BASE-TOOT is JSON for the base toot, if any."
+BASE-TOOT is JSON for the base toot, if any.
+GROUP is the notification group if any.
+ACCOUNT is the notification account if any."
(let* ((created-time
(if group
(mastodon-tl--field 'latest_page_notification_at group)
@@ -814,9 +816,7 @@ BASE-TOOT is JSON for the base toot, if any."
(boosted (eq t (mastodon-tl--field 'reblogged toot)))
(bookmarked (eq t (mastodon-tl--field 'bookmarked toot)))
(visibility (mastodon-tl--field 'visibility toot))
- (type (if group
- (alist-get 'type group)
- (alist-get 'type toot)))
+ (type (alist-get 'type (or group toot)))
(base-toot-maybe (or base-toot ;; show edits for notifs
(mastodon-tl--toot-or-base toot))) ;; for boosts
(account (or account
@@ -1648,7 +1648,7 @@ Runs `mastodon-tl--render-text' and fetches poll or media."
(defun mastodon-tl--insert-status
(toot body author-byline action-byline &optional id base-toot
- detailed-p thread domain unfolded no-byline group accounts)
+ detailed-p thread domain unfolded no-byline)
"Display the content and byline of timeline element TOOT.
BODY will form the section of the toot above the byline.
AUTHOR-BYLINE is an optional function for adding the author
@@ -1668,14 +1668,11 @@ THREAD means the status will be displayed in a thread view.
When DOMAIN, force inclusion of user's domain in their handle.
UNFOLDED is a boolean meaning whether to unfold or fold item if foldable.
NO-BYLINE means just insert toot body, used for folding."
- (let* ((reply-to-id
- (if group
- (alist-get 'status_id group)
- (alist-get 'in_reply_to_id toot)))
+ (let* ((reply-to-id (alist-get 'in_reply_to_id toot))
(after-reply-status-p
(when (and thread reply-to-id)
(mastodon-tl--after-reply-status reply-to-id)))
- (type (alist-get 'type (or group toot)))
+ ;; (type (alist-get 'type toot))
(toot-foldable
(and mastodon-tl--fold-toots-at-length
(length> body mastodon-tl--fold-toots-at-length))))
@@ -1706,7 +1703,7 @@ NO-BYLINE means just insert toot body, used for folding."
(if no-byline
""
(mastodon-tl--byline toot author-byline detailed-p
- domain base-toot group)))
+ domain base-toot)))
'item-type 'toot
'item-id (or id ; notification's own id
(alist-get 'id toot)) ; toot id
@@ -1719,10 +1716,7 @@ NO-BYLINE means just insert toot body, used for folding."
'base-toot base-toot
'cursor-face 'mastodon-cursor-highlight-face
'toot-foldable toot-foldable
- 'toot-folded (and toot-foldable (not unfolded))
- 'notification-type type
- 'notification-group group
- 'notification-accounts accounts)
+ 'toot-folded (and toot-foldable (not unfolded)))
(if no-byline "" "\n"))))
(defun mastodon-tl--is-reply (toot)