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; }