emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/mastodon 7d61f38a6b 07/50: FIX #609. insert-status remove


From: ELPA Syncer
Subject: [nongnu] elpa/mastodon 7d61f38a6b 07/50: FIX #609. insert-status remove author-byline arg, its always the same function
Date: Sat, 2 Nov 2024 13:00:51 -0400 (EDT)

branch: elpa/mastodon
commit 7d61f38a6bbe8a329892c5e91d1627a3ab03ee66
Author: marty hiatt <martianhiatus@disroot.org>
Commit: marty hiatt <martianhiatus@disroot.org>

    FIX #609. insert-status remove author-byline arg, its always the same 
function
---
 lisp/mastodon-notifications.el | 11 +++++------
 lisp/mastodon-tl.el            | 16 +++++++---------
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/lisp/mastodon-notifications.el b/lisp/mastodon-notifications.el
index 97d0d80632..6d6b339df6 100644
--- a/lisp/mastodon-notifications.el
+++ b/lisp/mastodon-notifications.el
@@ -273,8 +273,6 @@ JSON is a list of alists."
        ;;     (propertize
        ;;      (mastodon-notifications--comment-note-text body)))
        ;;    (t body)))
-       ;; author-byline
-       #'mastodon-tl--byline-author
        ;; action-byline
        (unless (member type '(follow follow_request mention))
          (downcase
@@ -323,8 +321,6 @@ ACCOUNTS is data of the accounts that have reacted to the 
notification."
            ;; body
            (mastodon-notifiations--body-arg
             type filters status profile-note follower-name group)
-           ;; author-byline
-           #'mastodon-tl--byline-author
            ;; action-byline
            (unless (member type '(follow follow_request mention))
              (downcase
@@ -379,7 +375,7 @@ FILTERS STATUS PROFILE-NOTE FOLLOWER-NAME GROUP."
      (t body))))
 
 (defun mastodon-notifications--insert-note
-    (toot body author-byline action-byline action-authors action-symbol
+    (toot body action-byline action-authors action-symbol
           &optional base-toot unfolded group accounts type)
   "Display the content and byline of timeline element TOOT.
 BODY will form the section of the toot above the byline.
@@ -420,7 +416,10 @@ ACCOUNTS is the notification accounts data."
        "\n"
        ;; actual byline:
        (mastodon-tl--byline
-        toot author-byline nil nil base-toot group
+        toot nil nil base-toot group
+        ;; FIXME: remove account arg (esp. if we have type). maybe we need
+        ;; type arg when we step from notifs (here); to tl--byline land
+        ;; (there):
         (when (member type '("follow" "follow_request"))
           toot) ;; account data!
         ;; types listed here use base item timestamp, else we use group's
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index 4f77f9240d..61014ffe67 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -796,7 +796,7 @@ LETTER is a string, F for favourited, B for boosted, or K 
for bookmarked."
       (image-type-available-p 'imagemagick)
     (image-transforms-p)))
 
-(defun mastodon-tl--byline (toot author-byline &optional detailed-p
+(defun mastodon-tl--byline (toot &optional detailed-p
                                  domain base-toot group account ts type)
   "Generate byline for TOOT.
 AUTHOR-BYLINE is a function for adding the author portion of
@@ -861,7 +861,7 @@ TS is a timestamp from the server, if any."
        ;; NB: action-byline (boost) is now added in insert-status, so no
        ;; longer part of the byline.
        ;; (base) author byline:
-       (funcall author-byline toot nil domain :base account)
+       (mastodon-tl--byline-author toot nil domain :base account)
        ;; visibility:
        (cond ((string= visibility "direct")
               (propertize (concat " " (mastodon-tl--symbol 'direct))
@@ -1654,7 +1654,7 @@ Runs `mastodon-tl--render-text' and fetches poll or 
media."
     (string= reply-to-id prev-id)))
 
 (defun mastodon-tl--insert-status
-    (toot body author-byline action-byline &optional id base-toot
+    (toot body action-byline &optional id base-toot
           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.
@@ -1709,8 +1709,7 @@ NO-BYLINE means just insert toot body, used for folding."
        "\n"
        (if no-byline
            ""
-         (mastodon-tl--byline toot author-byline detailed-p
-                              domain base-toot)))
+         (mastodon-tl--byline toot detailed-p domain base-toot)))
       'item-type    'toot
       'item-id      (or id ; notification's own id
                         (alist-get 'id toot)) ; toot id
@@ -1792,10 +1791,9 @@ NO-BYLINE means just insert toot body, used for folding."
     (if (and filtered (assoc "hide" filters))
         nil ;; no insert
       (mastodon-tl--insert-status
-       toot
-       (mastodon-tl--clean-tabs-and-nl spoiler-or-content)
-       #'mastodon-tl--byline-author #'mastodon-tl--byline-boost
-       nil nil detailed-p thread domain unfolded no-byline))))
+       toot (mastodon-tl--clean-tabs-and-nl spoiler-or-content)
+       #'mastodon-tl--byline-boost nil nil detailed-p
+       thread domain unfolded no-byline))))
 
 (defun mastodon-tl--timeline (toots &optional thread domain no-byline)
   "Display each toot in TOOTS.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]