From 299b72043a61d6e500d04c45221fd21adb94eef8 Mon Sep 17 00:00:00 2001 From: marty hiatt Date: Tue, 6 Aug 2024 12:38:01 +0200 Subject: refactor mastodon-profile--user-profile-send-updated --- lisp/mastodon-profile.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/mastodon-profile.el b/lisp/mastodon-profile.el index 9461f02..8249641 100644 --- a/lisp/mastodon-profile.el +++ b/lisp/mastodon-profile.el @@ -347,10 +347,8 @@ Ask for confirmation if length > 500 characters." (interactive) (let* ((note (mastodon-profile--note-remove-header)) (url (mastodon-http--api "accounts/update_credentials"))) - (if (> (mastodon-toot--count-toot-chars note) 500) - (when (y-or-n-p "Note is over mastodon's max for profile notes (500). Proceed?") - (quit-window 'kill) - (mastodon-profile--user-profile-send-updated-do url note)) + (when (or (not (> (mastodon-toot--count-toot-chars note) 500)) + (y-or-n-p "Note is over mastodon's max for profile notes (500). Proceed?")) (quit-window 'kill) (mastodon-profile--user-profile-send-updated-do url note)))) -- cgit v1.2.3