mirror of
https://github.com/tooot-app/app
synced 2025-02-18 12:50:46 +01:00
Forgiving blurhash
This commit is contained in:
parent
3e3ae67155
commit
e765a8fd7c
@ -51,14 +51,16 @@ const AttachmentVideo: React.FC<Props> = ({ sensitiveShown, video }) => {
|
|||||||
/>
|
/>
|
||||||
<Pressable style={styles.overlay}>
|
<Pressable style={styles.overlay}>
|
||||||
{sensitiveShown ? (
|
{sensitiveShown ? (
|
||||||
<Surface
|
video.blurhash ? (
|
||||||
style={{
|
<Surface
|
||||||
width: '100%',
|
style={{
|
||||||
height: '100%'
|
width: '100%',
|
||||||
}}
|
height: '100%'
|
||||||
>
|
}}
|
||||||
<Blurhash hash={video.blurhash} />
|
>
|
||||||
</Surface>
|
<Blurhash hash={video.blurhash} />
|
||||||
|
</Surface>
|
||||||
|
) : null
|
||||||
) : (
|
) : (
|
||||||
<Button
|
<Button
|
||||||
type='icon'
|
type='icon'
|
||||||
|
@ -33,11 +33,11 @@ const TimelineCard: React.FC<Props> = ({ card }) => {
|
|||||||
if (imageLoaded) {
|
if (imageLoaded) {
|
||||||
return <Image source={{ uri: card.image }} style={styles.image} />
|
return <Image source={{ uri: card.image }} style={styles.image} />
|
||||||
} else {
|
} else {
|
||||||
return (
|
return card.blurhash ? (
|
||||||
<Surface style={styles.image}>
|
<Surface style={styles.image}>
|
||||||
<Blurhash hash={card.blurhash} />
|
<Blurhash hash={card.blurhash} />
|
||||||
</Surface>
|
</Surface>
|
||||||
)
|
) : null
|
||||||
}
|
}
|
||||||
}, [imageLoaded])
|
}, [imageLoaded])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user