From 82ea8503444d943a6561af950482ce9ee0a92c57 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 18 Nov 2024 08:30:39 -0600 Subject: [PATCH] StatusContent: display custom from status emojis, not server emojis --- src/components/status-content.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/status-content.tsx b/src/components/status-content.tsx index 4924d6509..5ff45f88f 100644 --- a/src/components/status-content.tsx +++ b/src/components/status-content.tsx @@ -5,7 +5,6 @@ import parse, { Element, type HTMLReactParserOptions, domToReact, type DOMNode, import { useState, useRef, useLayoutEffect, useMemo, memo } from 'react'; import { FormattedMessage } from 'react-intl'; -import { useCustomEmojis } from 'soapbox/api/hooks/useCustomEmojis.ts'; import Icon from 'soapbox/components/icon.tsx'; import { getTextDirection } from '../utils/rtl.ts'; @@ -52,7 +51,6 @@ const StatusContent: React.FC = ({ const [collapsed, setCollapsed] = useState(false); const node = useRef(null); - const { customEmojis } = useCustomEmojis(); const isOnlyEmoji = useMemo(() => { const textContent = new DOMParser().parseFromString(status.content, 'text/html').body.firstChild?.textContent ?? ''; @@ -102,7 +100,7 @@ const StatusContent: React.FC = ({ if (shortcodes[i]) { const [text, shortcode] = shortcodes[i]; - const customEmoji = customEmojis.find((e) => e.shortcode === shortcode); + const customEmoji = status.emojis.find((e) => e.shortcode === shortcode); if (customEmoji) { parts.push({shortcode});