From d1402af0b21b2df9488993d7a28f7074d3743c90 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 16 Sep 2025 14:23:44 +0200 Subject: [PATCH] Change reblog button to immediately show the interaction modal when logged out (#36138) --- .../components/status/boost_button.tsx | 31 +++++-------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/app/javascript/mastodon/components/status/boost_button.tsx b/app/javascript/mastodon/components/status/boost_button.tsx index 33f4b1a7289..64bda4dcaac 100644 --- a/app/javascript/mastodon/components/status/boost_button.tsx +++ b/app/javascript/mastodon/components/status/boost_button.tsx @@ -97,11 +97,7 @@ export const StatusBoostButton: FC = ({ highlighted: wasBoosted, disabled: boostItem.disabled, action: (event) => { - if (isLoggedIn) { - dispatch(toggleReblog(statusId, event.shiftKey)); - } else { - showLoginPrompt(); - } + dispatch(toggleReblog(statusId, event.shiftKey)); }, }, { @@ -112,33 +108,22 @@ export const StatusBoostButton: FC = ({ icon: quoteItem.iconComponent, disabled: quoteItem.disabled, action: () => { - if (isLoggedIn) { - dispatch(quoteComposeById(statusId)); - } else { - showLoginPrompt(); - } + dispatch(quoteComposeById(statusId)); }, }, ] satisfies [ActionMenuItemWithIcon, ActionMenuItemWithIcon]; - }, [ - dispatch, - intl, - isLoggedIn, - showLoginPrompt, - statusId, - statusState, - wasBoosted, - ]); + }, [dispatch, intl, statusId, statusState, wasBoosted]); const boostIcon = items[0].icon; const handleDropdownOpen = useCallback( (event: MouseEvent | KeyboardEvent) => { + if (!isLoggedIn) { + showLoginPrompt(); + return false; + } + if (event.shiftKey) { - if (!isLoggedIn) { - showLoginPrompt(); - return false; - } dispatch(toggleReblog(status.get('id'), true)); return false; }