diff --git a/app/soapbox/components/status-reaction-wrapper.tsx b/app/soapbox/components/status-reaction-wrapper.tsx index 206cd1fed..af27213ac 100644 --- a/app/soapbox/components/status-reaction-wrapper.tsx +++ b/app/soapbox/components/status-reaction-wrapper.tsx @@ -4,7 +4,7 @@ import { simpleEmojiReact } from 'soapbox/actions/emoji-reacts'; import { openModal } from 'soapbox/actions/modals'; import { EmojiSelector, Portal } from 'soapbox/components/ui'; import { useAppDispatch, useAppSelector, useOwnAccount, useSoapboxConfig } from 'soapbox/hooks'; -import { isUserTouching } from 'soapbox/is-mobile'; +// import { isUserTouching } from 'soapbox/is-mobile'; import { getReactForStatus } from 'soapbox/utils/emoji-reacts'; interface IStatusReactionWrapper { @@ -34,31 +34,31 @@ const StatusReactionWrapper: React.FC = ({ statusId, chi if (!status) return null; - const handleMouseEnter = () => { - if (timeout.current) { - clearTimeout(timeout.current); - } + // const handleMouseEnter = () => { + // if (timeout.current) { + // clearTimeout(timeout.current); + // } - if (!isUserTouching()) { - setVisible(true); - } - }; + // if (!isUserTouching()) { + // setVisible(true); + // } + // }; - const handleMouseLeave = () => { - if (timeout.current) { - clearTimeout(timeout.current); - } + // const handleMouseLeave = () => { + // if (timeout.current) { + // clearTimeout(timeout.current); + // } - // Unless the user is touching, delay closing the emoji selector briefly - // so the user can move the mouse diagonally to make a selection. - if (isUserTouching()) { - setVisible(false); - } else { - timeout.current = setTimeout(() => { - setVisible(false); - }, 500); - } - }; + // // Unless the user is touching, delay closing the emoji selector briefly + // // so the user can move the mouse diagonally to make a selection. + // if (isUserTouching()) { + // setVisible(false); + // } else { + // timeout.current = setTimeout(() => { + // setVisible(false); + // }, 500); + // } + // }; const handleReact = (emoji: string, custom?: string): void => { if (ownAccount) { @@ -71,21 +71,9 @@ const StatusReactionWrapper: React.FC = ({ statusId, chi }; const handleClick: React.EventHandler = e => { - const meEmojiReact = getReactForStatus(status, soapboxConfig.allowedEmoji)?.get('name') || '👍'; + const meEmojiReact = getReactForStatus(status, soapboxConfig.allowedEmoji)?.get('name') || '⚡'; - if (isUserTouching()) { - if (ownAccount) { - if (visible) { - handleReact(meEmojiReact); - } else { - setVisible(true); - } - } else { - handleUnauthorized(); - } - } else { - handleReact(meEmojiReact); - } + handleReact(meEmojiReact); e.preventDefault(); e.stopPropagation(); @@ -99,7 +87,7 @@ const StatusReactionWrapper: React.FC = ({ statusId, chi }; return ( -
+
{React.cloneElement(children, { onClick: handleClick, ref: setReferenceElement,