1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
Assuming most toot won't include more than 4 images. For below 4 images, mostly they are not cropped unless they are too long. For single image, mostly it is not cropped unless it is longer than 3/2.
This commit is contained in:
xmflsct
2022-12-12 22:24:03 +01:00
parent 91be219ff3
commit 96497aad25
7 changed files with 73 additions and 47 deletions

View File

@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next'
import { View } from 'react-native'
import { Blurhash } from 'react-native-blurhash'
import AttachmentAltText from './AltText'
import attachmentAspectRatio from './aspectRatio'
import { aspectRatio } from './dimensions'
export interface Props {
total: number
@ -29,7 +29,7 @@ const AttachmentUnsupported: React.FC<Props> = ({ total, index, sensitiveShown,
padding: StyleConstants.Spacing.XS / 2,
justifyContent: 'center',
alignItems: 'center',
aspectRatio: attachmentAspectRatio({ total, index })
aspectRatio: aspectRatio({ total, index, ...attachment.meta?.original })
}}
>
{attachment.blurhash ? (