Web Page: Fix document with photo layout (#5089)
This commit is contained in:
parent
f3668b50ee
commit
6049090857
@ -136,7 +136,7 @@ const WebPage: FC<OwnProps> = ({
|
|||||||
const truncatedDescription = trimText(description, MAX_TEXT_LENGTH);
|
const truncatedDescription = trimText(description, MAX_TEXT_LENGTH);
|
||||||
const isArticle = Boolean(truncatedDescription || title || siteName);
|
const isArticle = Boolean(truncatedDescription || title || siteName);
|
||||||
let isSquarePhoto = Boolean(stickers);
|
let isSquarePhoto = Boolean(stickers);
|
||||||
if (isArticle && webPage?.photo && !webPage.video) {
|
if (isArticle && webPage?.photo && !webPage.video && !webPage.document) {
|
||||||
const { width, height } = calculateMediaDimensions({
|
const { width, height } = calculateMediaDimensions({
|
||||||
media: webPage.photo,
|
media: webPage.photo,
|
||||||
isOwn: message.isOutgoing,
|
isOwn: message.isOutgoing,
|
||||||
@ -193,7 +193,7 @@ const WebPage: FC<OwnProps> = ({
|
|||||||
{isStory && (
|
{isStory && (
|
||||||
<BaseStory story={story} isProtected={isProtected} isConnected={isConnected} isPreview />
|
<BaseStory story={story} isProtected={isProtected} isConnected={isConnected} isPreview />
|
||||||
)}
|
)}
|
||||||
{photo && !video && (
|
{photo && !video && !document && (
|
||||||
<Photo
|
<Photo
|
||||||
photo={photo}
|
photo={photo}
|
||||||
isOwn={message.isOutgoing}
|
isOwn={message.isOutgoing}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user