fix(mobile): keep the image viewer's close button out of the iPhone Duo status column (#37203)

The close button sat at a fixed 16pt from the right edge and ignored the
window's right safe-area inset, which on the iPhone Duo is the status
column holding the clock and the camera. Offset it by that inset, and size
it to 44pt itself because page Pressables ignore hitSlop.
This commit is contained in:
Kelvin Amoaba
2026-11-01 22:49:46 +00:00
committed by GitHub
parent 7f9940e937
commit f41f72a4f3
@@ -44,11 +44,10 @@ export function MobileNativeChatImageViewer({
<Pressable
style={({ pressed }) => [
styles.close,
{ top: insets.top + spacing.sm },
{ top: insets.top + spacing.sm, right: insets.right + spacing.lg },
pressed && { opacity: feedback.pressedOpacity }
]}
onPress={close}
hitSlop={12}
accessibilityRole="button"
accessibilityLabel={t('chat.nativeChatImageViewer.closeImage', 'Close image')}
>
@@ -106,10 +105,13 @@ const styles = themedStyleSheet(() => ({
stage: {
flex: 1
},
// Page Pressables ignore hitSlop, so the button itself is the 44pt target.
close: {
position: 'absolute',
right: spacing.lg,
padding: spacing.sm,
width: 44,
height: 44,
alignItems: 'center',
justifyContent: 'center',
borderRadius: radii.pill,
backgroundColor: colors.bgRaised
}