aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2022-02-15 15:30:58 +0100
committermousebot <mousebot@riseup.net>2022-02-15 15:33:33 +0100
commit787f18dcff2ee7a4c5a5cbf331f4e2d26997e1cc (patch)
tree5eddfda3c9c83ba58bb7a9320d6afd1f7f9ffbc6 /lisp
parent907991314d0f4e2b88eeb093a6222468e77c9068 (diff)
replace all calls to mastodon-search--insert-users-propertized
with calls to mastodon-profile--add-author-bylines.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon-profile.el3
-rw-r--r--lisp/mastodon-search.el24
-rw-r--r--lisp/mastodon-tl.el3
3 files changed, 5 insertions, 25 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index d632e5e..8ac0b67 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -398,8 +398,7 @@ FIELD is used to identify regions under 'account"
(defun mastodon-profile--add-author-bylines (tootv)
"Convert TOOTV into a author-bylines and insert."
(let ((inhibit-read-only t))
- (if (equal tootv '[])
- (message "Looks like you have no follow requests for the moment.")
+ (when (not (equal tootv '[]))
(mapc (lambda (toot)
(let ((start-pos (point)))
(insert "\n"
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el
index d17b054..2f8054a 100644
--- a/lisp/mastodon-search.el
+++ b/lisp/mastodon-search.el
@@ -98,7 +98,8 @@ Returns a nested list containing user handle, display name, and URL."
" USERS\n"
" ------------\n\n")
'success))
- (mastodon-search--insert-users-propertized user-ids :note)
+ (mastodon-profile--add-author-bylines accts)
+ ;; (mastodon-search--insert-users-propertized user-ids :note)
;; hashtag results:
(insert (mastodon-tl--set-face
(concat "\n ------------\n"
@@ -124,27 +125,6 @@ Returns a nested list containing user handle, display name, and URL."
(mapc 'mastodon-tl--toot toots-list-json)
(goto-char (point-min))))))
-(defun mastodon-search--insert-users-propertized (users &optional note)
- "Insert USERS list into the buffer.
-If NOTE is non-nil, include user's profile note.
-This is also called by `mastodon-tl--get-follow-suggestions'."
- (mapc (lambda (el)
- (insert (propertize (car el) 'face 'mastodon-display-name-face)
- " : \n : "
- (propertize (concat "@" (car (cdr el)))
- 'face 'mastodon-handle-face
- 'mouse-face 'highlight
- 'mastodon-tab-stop 'user-handle
- 'keymap mastodon-tl--link-keymap
- 'mastodon-handle (concat "@" (car (cdr el)))
- 'help-echo (concat "Browse user profile of @" (car (cdr el))))
- " : \n"
- (if note
- (mastodon-tl--render-text (cadddr el) nil)
- "")
- "\n"))
- users))
-
(defun mastodon-search--get-user-info (account)
"Get user handle, display name, account URL and profile note from ACCOUNT."
(list (alist-get 'display_name account)
diff --git a/lisp/mastodon-tl.el b/lisp/mastodon-tl.el
index efccc21..26364a6 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1107,7 +1107,8 @@ webapp"
" SUGGESTED ACCOUNTS\n"
" ------------\n\n")
'success))
- (mastodon-search--insert-users-propertized users :note)))))
+ (mastodon-profile--add-author-bylines response)))))
+ ;; (mastodon-search--insert-users-propertized users :note)))))
(defun mastodon-tl--follow-user (user-handle &optional notify)
"Query for USER-HANDLE from current status and follow that user.