mirror of
https://github.com/tooot-app/app
synced 2025-02-28 01:27:39 +01: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 }}
|
||||
blurhash={image.blurhash}
|
||||
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>
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user