Don't display sensitive content overlay when not needed

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-08-25 23:23:44 +02:00
parent a37d04b300
commit 7ee99288e0
3 changed files with 23 additions and 16 deletions

View file

@ -104,12 +104,12 @@ const QuotedStatus: React.FC<IQuotedStatus> = ({ status, onCancel, compose }) =>
{status.quote_id && <QuotedStatusIndicator statusId={status.quote_id} />}
<div className='relative'>
<SensitiveContentOverlay status={status} />
{status.media_attachments.length > 0 && (
{status.media_attachments.length > 0 && (
<div className='relative'>
<SensitiveContentOverlay status={status} />
<StatusMedia status={status} muted={compose} />
)}
</div>
</div>
)}
</Stack>
</Stack>
)}

View file

@ -427,13 +427,17 @@ const Status: React.FC<IStatus> = (props) => {
<TranslateButton status={actualStatus} />
{(quote || actualStatus.card || actualStatus.media_attachments.length > 0) && (
<Stack space={4} className='relative'>
<SensitiveContentOverlay status={actualStatus} />
<StatusMedia
status={actualStatus}
muted={muted}
onClick={handleClick}
/>
<Stack space={4}>
{actualStatus.media_attachments.length > 0 && (
<div className='relative'>
<SensitiveContentOverlay status={actualStatus} />
<StatusMedia
status={actualStatus}
muted={muted}
onClick={handleClick}
/>
</div>
)}
{quote}
</Stack>

View file

@ -126,10 +126,13 @@ const DetailedStatus: React.FC<IDetailedStatus> = ({
<TranslateButton status={actualStatus} />
{(withMedia && (quote || actualStatus.card || actualStatus.media_attachments.length > 0)) && (
<Stack space={4} className='relative'>
<SensitiveContentOverlay status={status} />
<StatusMedia status={actualStatus} />
<Stack space={4}>
{actualStatus.media_attachments.length > 0 && (
<div className='relative'>
<SensitiveContentOverlay status={status} />
<StatusMedia status={actualStatus} />
</div>
)}
{quote}
</Stack>