From 5a1f2d19de73fa233187b705e4fe72f31db194ff Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 16 May 2023 09:49:53 +0200 Subject: refactoring in profile--update-note-count --- lisp/mastodon-profile.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 0c6e3b2..b4684da 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -269,13 +269,12 @@ NO-REBLOGS means do not display boosts in statuses." (header-region (mastodon-tl--find-property-range 'note-header (point-min))) (count-region (mastodon-tl--find-property-range 'note-counter - (point-min)))) + (point-min))) + (count (number-to-string (mastodon-toot--count-toot-chars + (buffer-substring-no-properties + (cdr header-region) (point-max)))))) (add-text-properties (car count-region) (cdr count-region) - (list 'display - (number-to-string - (mastodon-toot--count-toot-chars - (buffer-substring-no-properties - (cdr header-region) (point-max)))))))) + (list 'display count)))) (defun mastodon-profile--update-profile-note-cancel () "Cancel updating user profile and kill buffer and window." -- cgit v1.2.3