diff --git a/packages/pl-fe/src/features/notifications/components/notification.tsx b/packages/pl-fe/src/features/notifications/components/notification.tsx index 072575f8c..280cf0264 100644 --- a/packages/pl-fe/src/features/notifications/components/notification.tsx +++ b/packages/pl-fe/src/features/notifications/components/notification.tsx @@ -217,18 +217,6 @@ const Notification: React.FC = (props) => { const { accounts } = notification; const account = accounts[0]; - const getHandlers = () => ({ - reply: handleReply, - favourite: handleHotkeyFavourite, - boost: handleHotkeyBoost, - mention: handleMention, - open: handleOpen, - openProfile: handleOpenProfile, - moveUp: handleMoveUp, - moveDown: handleMoveDown, - toggleSensitive: handleHotkeyToggleSensitive, - }); - const handleOpen = () => { if (status && typeof status === 'object' && account && typeof account === 'object') { history.push(`/@${account.acct}/posts/${status.id}`); @@ -307,6 +295,18 @@ const Notification: React.FC = (props) => { } }; + const handlers = { + reply: handleReply, + favourite: handleHotkeyFavourite, + boost: handleHotkeyBoost, + mention: handleMention, + open: handleOpen, + openProfile: handleOpenProfile, + moveUp: handleMoveUp, + moveDown: handleMoveDown, + toggleSensitive: handleHotkeyToggleSensitive, + }; + const displayedType = notification.type === 'mention' && (notification.subtype === 'reply' || status?.in_reply_to_account_id === me) ? 'reply' : notification.type; const renderIcon = (): React.ReactNode => { @@ -402,7 +402,7 @@ const Notification: React.FC = (props) => { ); return ( - +