diff --git a/src/components/common/StickerButton.tsx b/src/components/common/StickerButton.tsx index e33558bf..f36a9cf7 100644 --- a/src/components/common/StickerButton.tsx +++ b/src/components/common/StickerButton.tsx @@ -34,7 +34,6 @@ const StickerButton: FC = ({ // eslint-disable-next-line no-null/no-null const ref = useRef(null); - const { isAnimated } = sticker; const localMediaHash = `sticker${sticker.id}`; const stickerSelector = `sticker-button-${sticker.id}`; @@ -44,7 +43,7 @@ const StickerButton: FC = ({ const previewBlobUrl = useMedia(`${localMediaHash}?size=m`, !isIntersecting, ApiMediaFormat.BlobUrl); const shouldPlay = isIntersecting && !noAnimate; - const lottieData = useMedia(localMediaHash, !shouldPlay, ApiMediaFormat.Lottie); + const lottieData = useMedia(sticker.isAnimated && localMediaHash, !shouldPlay, ApiMediaFormat.Lottie); const [isAnimationLoaded, markLoaded, unmarkLoaded] = useFlag(Boolean(lottieData)); const canAnimatedPlay = isAnimationLoaded && shouldPlay; @@ -76,7 +75,7 @@ const StickerButton: FC = ({ const fullClassName = buildClassName( 'StickerButton', - isAnimated && 'animated', + sticker.isAnimated && 'animated', stickerSelector, className, );