Web Page: Fix document with photo layout (#5089)

This commit is contained in:
Alexander Zinchuk 2024-10-26 13:01:41 +04:00
parent f3668b50ee
commit 6049090857

View File

@ -136,7 +136,7 @@ const WebPage: FC<OwnProps> = ({
const truncatedDescription = trimText(description, MAX_TEXT_LENGTH);
const isArticle = Boolean(truncatedDescription || title || siteName);
let isSquarePhoto = Boolean(stickers);
if (isArticle && webPage?.photo && !webPage.video) {
if (isArticle && webPage?.photo && !webPage.video && !webPage.document) {
const { width, height } = calculateMediaDimensions({
media: webPage.photo,
isOwn: message.isOutgoing,
@ -193,7 +193,7 @@ const WebPage: FC<OwnProps> = ({
{isStory && (
<BaseStory story={story} isProtected={isProtected} isConnected={isConnected} isPreview />
)}
{photo && !video && (
{photo && !video && !document && (
<Photo
photo={photo}
isOwn={message.isOutgoing}