Don't display sensitive content overlay when not needed
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
a37d04b300
commit
7ee99288e0
3 changed files with 23 additions and 16 deletions
|
@ -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>
|
||||
)}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue