From 7b51ffda41dbf40ed5c5830b4911c5a6cab68d4d Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sun, 7 Aug 2022 17:21:45 +0200 Subject: profile - small cleanup of fields-insert --- lisp/mastodon-profile.el | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'lisp/mastodon-profile.el') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 260c2d3..0ac1c04 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -267,23 +267,15 @@ Returns a list of lists." (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 "_ '%-54s " (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) -- cgit v1.2.3 From 48f6f77cbffcdf8bfdc4ad6bb23d6e3dd7d67dda Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sun, 7 Aug 2022 20:52:18 +0200 Subject: Revert "profile - small cleanup of fields-insert" This reverts commit 7b51ffda41dbf40ed5c5830b4911c5a6cab68d4d. --- lisp/mastodon-profile.el | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'lisp/mastodon-profile.el') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 0ac1c04..260c2d3 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -267,15 +267,23 @@ Returns a list of lists." (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 "_ '%-54s " (car field)) - ;; (make-string (- (+ 1 left-width) (length (car field))) ?_) + (format "_ %s " (car field)) + (make-string (- (+ 1 left-width) (length (car field))) ?_) (format " :: %s" (cadr field))) - field)) ; hack to make links tabstops + ;; (make-string (- (+ 1 right-width) (length (cdr field))) ?_) + ;; " |") + field)) ; nil)) ; hack to make links tabstops fields ""))) (defun mastodon-profile--get-statuses-pinned (account) -- cgit v1.2.3 From 07953cabfc08fe43552016185525d1b34cd05769 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Sat, 20 Aug 2022 13:31:58 +0200 Subject: skip toot-json check on own profile load --- lisp/mastodon-profile.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lisp/mastodon-profile.el') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index cfea26c..ae244d8 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -416,7 +416,10 @@ If toot is a boost, opens the profile of the booster." user-handles nil ; predicate 'confirm))))) - (if (not (get-text-property (point) 'toot-json)) + (if (not (or + ;; own profile has no need for toot-json test: + (equal user-handle (mastodon-auth--get-account-name)) + (get-text-property (point) 'toot-json))) (message "Looks like there's no toot or user at point?") (let ((account (mastodon-profile--lookup-account-in-status user-handle (mastodon-profile--toot-json)))) -- cgit v1.2.3