-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a37bd62
commit 0d0ea8d
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
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)); | ||
+ let {height, width} = calculateDimensions(imageMetadata.height, imageMetadata.width, layoutWidth || getViewPortWidth(false, isTablet)); | ||
+ width -= 32; // margin right is actually larger in embeds | ||
const style = getStyleSheet(theme); | ||
|
||
const onError = useCallback(() => { | ||
-- | ||
2.47.0 | ||
|