From 4dd84c9d5214369ea6c51cad04148aa067b69f8f Mon Sep 17 00:00:00 2001 From: mousebot Date: Mon, 4 Oct 2021 12:24:34 +0200 Subject: make updating new toots inserts them after any pinned toots --- lisp/mastodon-profile.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lisp/mastodon-profile.el') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 98d11f7..28f2e46 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -111,7 +111,7 @@ extra keybindings." (mastodon-tl--property 'toot-json)) (defun mastodon-profile--make-author-buffer (account) - "Take a ACCOUNT and insert a user account into a new buffer." + "Take an ACCOUNT json and insert a user account into a new buffer." (mastodon-profile--make-profile-buffer-for account "statuses" #'mastodon-tl--timeline)) @@ -369,8 +369,9 @@ Returns a list of lists." (setq mastodon-tl--update-point (point)) (mastodon-media--inline-images (point-min) (point)) ;; insert pinned toots first - (if (and pinned (equal endpoint-type "statuses")) - (mastodon-profile--insert-statuses-pinned pinned)) + (when (and pinned (equal endpoint-type "statuses")) + (mastodon-profile--insert-statuses-pinned pinned) + (setq mastodon-tl--update-point (point))) ;updates to follow pinned toots (funcall update-function json))) ;;(mastodon-tl--goto-next-toot) (goto-char (point-min)))) -- cgit v1.2.3 From 3df45c1cd655f3c3555c47d6cfaf023ef13b6ca7 Mon Sep 17 00:00:00 2001 From: mousebot Date: Tue, 5 Oct 2021 18:52:05 +0200 Subject: get relationships for a user with 1 rather than 2 requests --- lisp/mastodon-profile.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp/mastodon-profile.el') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 28f2e46..2c364da 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -297,10 +297,11 @@ Returns a list of lists." (toots-count (mastodon-tl--as-string (mastodon-profile--account-field account 'statuses_count))) + (relationships (mastodon-profile--relationships-get id)) (followed-by-you (cdr (assoc 'following - (aref (mastodon-profile--relationships-get id) 0)))) + (aref relationships 0)))) (follows-you (cdr (assoc 'followed_by - (aref (mastodon-profile--relationships-get id) 0)))) + (aref relationships 0)))) (followsp (or (equal follows-you 't) (equal followed-by-you 't))) (fields (mastodon-profile--fields-get account)) (pinned (mastodon-profile--get-statuses-pinned account))) -- cgit v1.2.3