From fcd8838045a8ba66852b2f69904f939d3a8c6153 Mon Sep 17 00:00:00 2001 From: plebeius Date: Wed, 31 Dec 2025 15:23:56 +0100 Subject: [PATCH] fix(markdown): embedded media in comment.content shouldn't be expandable and should be already expanded --- .../comment-media/comment-media.tsx | 23 ++++++++++++------- src/components/markdown/markdown.tsx | 11 +++++++-- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/components/comment-media/comment-media.tsx b/src/components/comment-media/comment-media.tsx index 5cf09cbd..989da6b4 100644 --- a/src/components/comment-media/comment-media.tsx +++ b/src/components/comment-media/comment-media.tsx @@ -11,6 +11,7 @@ import Embed, { canEmbed } from '../embed'; interface MediaProps { commentMediaInfo?: CommentMediaInfo; deleted?: boolean; + disableToggle?: boolean; displayHeight?: string; displayWidth?: string; isFloatingEmbed?: boolean; @@ -83,7 +84,7 @@ const Thumbnail = ({ commentMediaInfo, deleted, displayHeight, displayWidth, isF ); }; -const Media = ({ commentMediaInfo, isReply, setShowThumbnail }: MediaProps) => { +const Media = ({ commentMediaInfo, disableToggle, isReply, setShowThumbnail }: MediaProps) => { const { t } = useTranslation(); const { thumbnail, type, url } = commentMediaInfo || {}; const isMobile = useIsMobile(); @@ -98,11 +99,11 @@ const Media = ({ commentMediaInfo, isReply, setShowThumbnail }: MediaProps) => { {type === 'iframe' && url ? ( ) : type === 'gif' ? ( - setShowThumbnail(true)} /> + setShowThumbnail(true)} /> ) : type === 'video' ? (