[Refactoring] Sticker: Remove unneeded IDs
This commit is contained in:
parent
fc9b679a66
commit
897c2f69ef
@ -4,7 +4,7 @@ import { ApiMessage } from '../../../api/types';
|
|||||||
|
|
||||||
import { NO_STICKER_SET_ID } from '../../../config';
|
import { NO_STICKER_SET_ID } from '../../../config';
|
||||||
import { getStickerDimensions } from '../../common/helpers/mediaDimensions';
|
import { getStickerDimensions } from '../../common/helpers/mediaDimensions';
|
||||||
import { getMessageHtmlId, getMessageMediaFormat, getMessageMediaHash } from '../../../global/helpers';
|
import { getMessageMediaFormat, getMessageMediaHash } from '../../../global/helpers';
|
||||||
import buildClassName from '../../../util/buildClassName';
|
import buildClassName from '../../../util/buildClassName';
|
||||||
import { ObserveFn, useIsIntersecting } from '../../../hooks/useIntersectionObserver';
|
import { ObserveFn, useIsIntersecting } from '../../../hooks/useIntersectionObserver';
|
||||||
import useMedia from '../../../hooks/useMedia';
|
import useMedia from '../../../hooks/useMedia';
|
||||||
@ -85,7 +85,6 @@ const Sticker: FC<OwnProps> = ({
|
|||||||
<div ref={ref} className={stickerClassName} onClick={!isMemojiSticker ? openModal : undefined}>
|
<div ref={ref} className={stickerClassName} onClick={!isMemojiSticker ? openModal : undefined}>
|
||||||
{(!isMediaReady || (isVideo && !canDisplayVideo)) && (
|
{(!isMediaReady || (isVideo && !canDisplayVideo)) && (
|
||||||
<img
|
<img
|
||||||
id={`sticker-thumb-${getMessageHtmlId(message.id)}`}
|
|
||||||
src={previewUrl}
|
src={previewUrl}
|
||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height}
|
||||||
@ -95,7 +94,6 @@ const Sticker: FC<OwnProps> = ({
|
|||||||
)}
|
)}
|
||||||
{!isLottie && !isVideo && (
|
{!isLottie && !isVideo && (
|
||||||
<img
|
<img
|
||||||
id={`sticker-${getMessageHtmlId(message.id)}`}
|
|
||||||
src={mediaData as string}
|
src={mediaData as string}
|
||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height}
|
||||||
@ -105,7 +103,6 @@ const Sticker: FC<OwnProps> = ({
|
|||||||
)}
|
)}
|
||||||
{isVideo && canDisplayVideo && isMediaReady && (
|
{isVideo && canDisplayVideo && isMediaReady && (
|
||||||
<video
|
<video
|
||||||
id={`sticker-${getMessageHtmlId(message.id)}`}
|
|
||||||
src={mediaData as string}
|
src={mediaData as string}
|
||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user