diff --git a/fluxer_app/src/features/lexical/composer/nodes/ComposerCustomEmoji.tsx b/fluxer_app/src/features/lexical/composer/nodes/ComposerCustomEmoji.tsx index 95eb77df3..5f64026bb 100644 --- a/fluxer_app/src/features/lexical/composer/nodes/ComposerCustomEmoji.tsx +++ b/fluxer_app/src/features/lexical/composer/nodes/ComposerCustomEmoji.tsx @@ -6,9 +6,8 @@ import type {FlatEmoji} from '@app/features/emoji/types/EmojiTypes'; import Guilds from '@app/features/guild/state/Guilds'; import {ComposerMentionContext} from '@app/features/lexical/composer/ComposerMentionContext'; import styles from '@app/features/lexical/composer/nodes/ComposerInline.module.css'; -import {setUrlQueryParams} from '@app/features/messaging/utils/MessagingUrlUtils'; +import {getEmojiRenderUrl} from '@app/features/messaging/utils/markdown/EmojiDetector'; import {EmojiWithTooltip} from '@app/features/ui/emoji_tooltip_content/EmojiWithTooltip'; -import * as AvatarSourceUtils from '@app/features/user/utils/AvatarSourceUtils'; import {msg} from '@lingui/core/macro'; import {useLingui} from '@lingui/react/macro'; import {observer} from 'mobx-react-lite'; @@ -33,7 +32,12 @@ interface ComposerCustomEmojiProps { export const ComposerCustomEmoji = observer(({emojiId, animated, display}: ComposerCustomEmojiProps) => { const {plainText} = useContext(ComposerMentionContext); const {i18n} = useLingui(); - const shouldAnimate = useShouldAnimate({kind: 'emoji'}); + const record = Emoji.getEmojiById(emojiId); + const isAnimatable = record?.animated ?? animated; + const shouldAnimate = useShouldAnimate({ + kind: 'emoji', + isAnimated: isAnimatable, + }); if (plainText) { return (