RegularToot: only show preview if reveal
All checks were successful
/ depoly (push) Successful in 1m20s

This commit is contained in:
thislight 2024-11-20 21:17:22 +08:00
parent 8cd95b9e90
commit 8d8d2a8fb1
No known key found for this signature in database
GPG key ID: FCFE5192241CCD4E

View file

@ -339,7 +339,11 @@ const RegularToot: Component<RegularTootProps> = (props) => {
reveal={reveal()}
onToggleReveal={[onToggleReveal, setReveal]}
/>
<Show when={toot().card}>
<Show
when={
toot().card && (!toot().sensitive || (toot().sensitive && reveal()))
}
>
<PreviewCard src={toot().card!} />
</Show>
<Show when={toot().mediaAttachments.length > 0}>