aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormousebot <mousebot@riseup.net>2022-02-15 20:28:44 +0100
committermousebot <mousebot@riseup.net>2022-02-17 09:45:45 +0100
commit5c6fa1b6aae1c0b1bf09b2be700958351feb1861 (patch)
treeeeeb6af3d7be5b1e819b92c85a33ebddb1108281
parentf37c97de8b192caf68d4b39c3830e85b5aa09d2e (diff)
Revert "replace all calls to mastodon-search--insert-users-propertized"
This reverts commit 787f18dcff2ee7a4c5a5cbf331f4e2d26997e1cc.
-rw-r--r--lisp/mastodon-search.el24
-rw-r--r--lisp/mastodon-tl.el2
2 files changed, 23 insertions, 3 deletions
diff --git a/lisp/mastodon-search.el b/lisp/mastodon-search.el
index 2f8054a..d17b054 100644
--- a/lisp/mastodon-search.el
+++ b/lisp/mastodon-search.el
@@ -98,8 +98,7 @@ Returns a nested list containing user handle, display name, and URL."
" USERS\n"
" ------------\n\n")
'success))
- (mastodon-profile--add-author-bylines accts)
- ;; (mastodon-search--insert-users-propertized user-ids :note)
+ (mastodon-search--insert-users-propertized user-ids :note)
;; hashtag results:
(insert (mastodon-tl--set-face
(concat "\n ------------\n"
@@ -125,6 +124,27 @@ 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 d82a0a5..3167f9c 100644
--- a/lisp/mastodon-tl.el
+++ b/lisp/mastodon-tl.el
@@ -1253,7 +1253,7 @@ RESPONSE is the JSON returned by the server."
" SUGGESTED ACCOUNTS\n"
" ------------\n\n")
'success))
- (mastodon-profile--add-author-bylines response)
+ (mastodon-search--insert-users-propertized users :note)
(goto-char (point-min))))
(defun mastodon-tl--follow-user (user-handle &optional notify)