mirror of
https://github.com/tooot-app/app
synced 2024-12-12 00:57:28 +01:00
Square image when image is too long
This commit is contained in:
parent
ca4594328f
commit
e388ce7626
@ -34,8 +34,8 @@ const AttachmentImage = React.memo(
|
|||||||
!image.meta?.original?.width ||
|
!image.meta?.original?.width ||
|
||||||
!image.meta?.original?.height
|
!image.meta?.original?.height
|
||||||
? attachmentAspectRatio({ total, index })
|
? attachmentAspectRatio({ total, index })
|
||||||
: image.meta.original.height / image.meta.original.width > 2
|
: image.meta.original.height / image.meta.original.width > 1
|
||||||
? 0.5
|
? 1
|
||||||
: image.meta.original.width / image.meta.original.height
|
: image.meta.original.width / image.meta.original.height
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -60,7 +60,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
|||||||
})
|
})
|
||||||
}, 500)
|
}, 500)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (Math.random() < 0.1) {
|
if (Math.random() < 0.05) {
|
||||||
Sentry.Native.captureException(err)
|
Sentry.Native.captureException(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ const TabSharedToot: React.FC<TabSharedStackScreenProps<'Tab-Shared-Toot'>> = ({
|
|||||||
500
|
500
|
||||||
)
|
)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (Math.random() < 0.1) {
|
if (Math.random() < 0.05) {
|
||||||
Sentry.Native.captureException(err)
|
Sentry.Native.captureException(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user