mirror of
https://github.com/tooot-app/app
synced 2025-05-21 14:04:22 +02:00
Show full image when only 1
This commit is contained in:
parent
c6d3514fa2
commit
ba7c31c4e7
@ -28,7 +28,17 @@ const AttachmentImage = React.memo(
|
|||||||
uri={{ original: image.preview_url, remote: image.remote_url }}
|
uri={{ original: image.preview_url, remote: image.remote_url }}
|
||||||
blurhash={image.blurhash}
|
blurhash={image.blurhash}
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
style={[{ aspectRatio: attachmentAspectRatio({ total, index }) }]}
|
style={[
|
||||||
|
{
|
||||||
|
aspectRatio:
|
||||||
|
total > 1 ||
|
||||||
|
!image.meta?.original?.width ||
|
||||||
|
!image.meta?.original?.height ||
|
||||||
|
image.meta.original.width / image.meta.original.height > 2
|
||||||
|
? attachmentAspectRatio({ total, index })
|
||||||
|
: image.meta.original.width / image.meta.original.height
|
||||||
|
}
|
||||||
|
]}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user