-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0006-Fix-embed-width.patch
26 lines (22 loc) · 1.41 KB
/
0006-Fix-embed-width.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 9ae9b83ea4f90c6f2f6e7c789c30db14e458176e Mon Sep 17 00:00:00 2001
From: I-Al-Istannen <[email protected]>
Date: Sun, 17 Nov 2024 22:48:54 +0100
Subject: [PATCH] Fix embed width
---
.../content/message_attachments/attachment_image/index.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/components/post_list/post/body/content/message_attachments/attachment_image/index.tsx b/app/components/post_list/post/body/content/message_attachments/attachment_image/index.tsx
index f46fd44b1..bb1db2f7f 100644
--- a/app/components/post_list/post/body/content/message_attachments/attachment_image/index.tsx
+++ b/app/components/post_list/post/body/content/message_attachments/attachment_image/index.tsx
@@ -57,7 +57,8 @@ const AttachmentImage = ({imageUrl, imageMetadata, layoutWidth, location, postId
const [error, setError] = useState(false);
const fileId = useRef(generateId('uid')).current;
const isTablet = useIsTablet();
- const {height, width} = calculateDimensions(imageMetadata.height, imageMetadata.width, layoutWidth || getViewPortWidth(false, isTablet, true));
+ let {height, width} = calculateDimensions(imageMetadata.height, imageMetadata.width, layoutWidth || getViewPortWidth(false, isTablet, true));
+ width -= 32; // margin right is actually larger in embeds
const style = getStyleSheet(theme);
const onError = useCallback(() => {
--
2.47.0