From 60490908578c026f7ee2214c6d55d5b3e2aaa6d3 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Sat, 26 Oct 2024 13:01:41 +0400 Subject: [PATCH] Web Page: Fix document with photo layout (#5089) --- src/components/middle/message/WebPage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/middle/message/WebPage.tsx b/src/components/middle/message/WebPage.tsx index 180875abb..8709150c4 100644 --- a/src/components/middle/message/WebPage.tsx +++ b/src/components/middle/message/WebPage.tsx @@ -136,7 +136,7 @@ const WebPage: FC = ({ 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 = ({ {isStory && ( )} - {photo && !video && ( + {photo && !video && !document && (