mirror of
https://github.com/stablyai/orca.git
synced 2026-11-17 19:34:29 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user