diff --git a/packages/pl-fe/src/components/status-action-bar.tsx b/packages/pl-fe/src/components/status-action-bar.tsx index d56ca7f67..08a72b903 100644 --- a/packages/pl-fe/src/components/status-action-bar.tsx +++ b/packages/pl-fe/src/components/status-action-bar.tsx @@ -365,6 +365,12 @@ const WrenchButton: React.FC = ({ const { openModal } = useModalsStore(); const { showWrenchButton } = useSettings(); + const hasLongerWrench = useAppSelector(({ custom_emojis }) => { + if (!features.customEmojiReacts) return null; + + return (custom_emojis.find(({ shortcode }) => shortcode === 'longestest_wrench') || custom_emojis.find(({ shortcode }) => shortcode === 'longest_wrench')); + }); + if (!me || withLabels || !features.emojiReacts || !showWrenchButton) return; const wrenches = showWrenchButton && status.emoji_reactions.find(emoji => emoji.name === '🔧') || undefined; @@ -377,9 +383,12 @@ const WrenchButton: React.FC = ({ } }; - const handleWrenchLongPress = wrenches?.count ? () => { - openModal('REACTIONS', { statusId: status.id, reaction: wrenches.name }); - } : undefined; + const handleWrenchLongPress = () => { + if (hasLongerWrench) dispatch(emojiReact(status, hasLongerWrench.shortcode, hasLongerWrench.url)); + else if (wrenches?.count) { + openModal('REACTIONS', { statusId: status.id, reaction: wrenches.name }); + } + }; return (