aboutsummaryrefslogtreecommitdiff
path: root/lisp/mastodon-profile.el
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-08-20 12:48:47 +0200
committermarty hiatt <martianhiatus [a t] riseup [d o t] net>2022-08-20 12:48:47 +0200
commit6ec8587f8ad140fd8c79aefbb25d7cabbe54a879 (patch)
tree0343be0974f337feaae12bde439d151840b3cc7b /lisp/mastodon-profile.el
parent5c8ec25bea01223aa37f5291bad560c0c2e6f806 (diff)
parent7be929c123d8ce94934a8b6f7c214df1d0bc346f (diff)
Merge branch 'develop' into macros
Diffstat (limited to 'lisp/mastodon-profile.el')
-rw-r--r--lisp/mastodon-profile.el22
1 files changed, 5 insertions, 17 deletions
diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el
index 260c2d3..cfea26c 100644
--- a/lisp/mastodon-profile.el
+++ b/lisp/mastodon-profile.el
@@ -253,37 +253,25 @@ JSON is the data returned by the server."
(defun mastodon-profile--fields-get (account)
"Fetch the fields vector (aka profile metadata) from profile of ACCOUNT.
-
Returns a list of lists."
(let ((fields (mastodon-profile--account-field account 'fields)))
(when fields
- (mapcar
- (lambda (el)
- (list
- (alist-get 'name el)
- (alist-get 'value el)))
- fields))))
+ (mapcar (lambda (el)
+ (list (alist-get 'name el)
+ (alist-get 'value el)))
+ fields))))
(defun mastodon-profile--fields-insert (fields)
"Format and insert field pairs (a.k.a profile metadata) in FIELDS."
(let* ((car-fields (mapcar 'car fields))
- ;; (cdr-fields (mapcar 'cadr fields))
- ;; (cdr-fields-rendered
- ;; (list
- ;; (mapcar (lambda (x)
- ;; (mastodon-tl--render-text x nil))
- ;; cdr-fields)))
(left-width (car (sort (mapcar 'length car-fields) '>))))
- ;; (right-width (car (sort (mapcar 'length cdr-fields) '>))))
(mapconcat (lambda (field)
(mastodon-tl--render-text
(concat
(format "_ %s " (car field))
(make-string (- (+ 1 left-width) (length (car field))) ?_)
(format " :: %s" (cadr field)))
- ;; (make-string (- (+ 1 right-width) (length (cdr field))) ?_)
- ;; " |")
- field)) ; nil)) ; hack to make links tabstops
+ field)) ; hack to make links tabstops
fields "")))
(defun mastodon-profile--get-statuses-pinned (account)