From fa54e20779d0f2420fe8d59ab44fdc05942f494f Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 28 May 2024 19:02:17 +0200 Subject: account settings var docstring. --- 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 31a1983..98ac9de 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -130,7 +130,10 @@ It contains details of the current user's account.") Other clients can change these settings on the server at any time, so this list is not the canonical source for settings. It is updated on entering mastodon mode and on toggle any setting it -contains") +contains. +This variable is set from data in +`mastodon-profile-credential-account' not +`mastodon-profile-account-preferences-data'.") (define-minor-mode mastodon-profile-update-mode "Minor mode to update user profile." -- cgit v1.2.3 From c688fd0b6eaa02b9fe0232fed860dd4d846bebdb Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 28 May 2024 20:38:19 +0200 Subject: fix setting lang un toot compose buffer --- lisp/mastodon-profile.el | 2 +- lisp/mastodon-toot.el | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'lisp/mastodon-profile.el') diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 98ac9de..712d447 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -501,7 +501,7 @@ Returns the results as an alist." "Limit string X to 255 chars max." (if (> (length x) 255) (substring x 0 255) x)) -;; used in tl.el +;; used in tl.el and toot.el: (defun mastodon-profile--get-preferences-pref (pref) "Fetch PREF from the endpoint \"/preferences\". If `mastodon-profile-acccount-preferences-data' is set, fetch diff --git a/lisp/mastodon-toot.el b/lisp/mastodon-toot.el index 89b1eec..654918c 100644 --- a/lisp/mastodon-toot.el +++ b/lisp/mastodon-toot.el @@ -1892,8 +1892,7 @@ EDIT means we are editing an existing toot, not composing a new one." ;; `mastodon-profile-credential-account' nor in ;; `mastodon-profile-account-settings'! (setq mastodon-toot--language - (alist-get 'posting:default:language - mastodon-profile-acccount-preferences-data)) + (mastodon-profile--get-preferences-pref 'posting:default:language)) ;; display original toot: (if mastodon-toot-display-orig-in-reply-buffer (progn -- cgit v1.2.3 From 040c69ad67a380482fff36335bbe975c36c99cdb Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Wed, 29 May 2024 13:49:12 +0200 Subject: display filtered follow langs on user profiles. FIX #559. --- 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 712d447..46a56f6 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -700,12 +700,20 @@ TAG is a hashtag to restrict posts to." 'success) ;; insert relationship (follows) (let-alist relationships - (let ((followsp (mastodon-profile--follows-p - (list .requested_by .following .followed_by)))) + (let* ((followsp (mastodon-profile--follows-p + (list .requested_by .following .followed_by))) + (rels (mastodon-profile--relationships-get .id)) + (langs-filtered (if-let ((langs (alist-get 'languages rels))) + (concat " (" + (mapconcat #'identity + langs + " ") + ")") + ""))) (if followsp (mastodon-tl--set-face (concat (when (equal .following 't) - " | FOLLOWED BY YOU") + (format " | FOLLOWED BY YOU%s" langs-filtered)) (when (equal .followed_by 't) " | FOLLOWS YOU") (when (equal .requested_by 't) -- cgit v1.2.3