diff --git a/src/components/mediaViewer/MediaViewer.tsx b/src/components/mediaViewer/MediaViewer.tsx index d539e1bee..896bddcfc 100644 --- a/src/components/mediaViewer/MediaViewer.tsx +++ b/src/components/mediaViewer/MediaViewer.tsx @@ -114,15 +114,14 @@ const MediaViewer: FC = ({ isVideo, isPhoto, bestImageData, + bestData, dimensions, isGif, isFromSharedMedia, avatarPhoto, fileName, - fullMediaBlobUrl, - previewBlobUrl, } = useMediaProps({ - message, avatarOwner, mediaId, delay: isGhostAnimation && ANIMATION_DURATION, + message, avatarOwner, mediaId, origin, delay: isGhostAnimation && ANIMATION_DURATION, }); const canReport = !!avatarPhoto && !isChatWithSelf; @@ -244,7 +243,7 @@ const MediaViewer: FC = ({ threadId, mediaId: id, avatarOwnerId: avatarOwner?.id, - origin, + origin: origin!, }, { forceOnHeavyAnimation: true, }); @@ -334,7 +333,7 @@ const MediaViewer: FC = ({ {renderSenderInfo()} = (props) => { isVideo, isPhoto, bestImageData, + bestData, dimensions, isGif, isVideoAvatar, - localBlobUrl, - fullMediaBlobUrl, - previewBlobUrl, - pictogramBlobUrl, videoSize, loadProgress, } = useMediaProps({ @@ -107,7 +104,7 @@ const MediaViewerContent: FC = (props) => { return (
{renderPhoto( - fullMediaBlobUrl || previewBlobUrl, + bestData, calculateMediaViewerDimensions(dimensions, false), !IS_SINGLE_COLUMN_LAYOUT && !isProtected, isProtected, @@ -119,7 +116,7 @@ const MediaViewerContent: FC = (props) => {
= (props) => { className={buildClassName('MediaViewerContent', hasFooter && 'has-footer')} > {isPhoto && renderPhoto( - localBlobUrl || fullMediaBlobUrl || previewBlobUrl || pictogramBlobUrl, + bestData, message && calculateMediaViewerDimensions(dimensions!, hasFooter), !IS_SINGLE_COLUMN_LAYOUT && !isProtected, isProtected, @@ -164,7 +161,7 @@ const MediaViewerContent: FC = (props) => { ) : (