add ability to swipe to dismiss the player modal (#718)

This commit is contained in:
Violet Caulfield
2025-11-24 19:30:09 -06:00
committed by GitHub
parent 5671f30b71
commit 741e90bca9
2 changed files with 6 additions and 9 deletions
+4 -8
View File
@@ -8,7 +8,7 @@ import Animated, {
withSpring,
withTiming,
} from 'react-native-reanimated'
import { LayoutChangeEvent, Platform } from 'react-native'
import { LayoutChangeEvent } from 'react-native'
import MaterialDesignIcons from '@react-native-vector-icons/material-design-icons'
import navigationRef from '../../../../navigation'
import { useCurrentTrack, useQueueRef } from '../../../stores/player/queue'
@@ -31,16 +31,12 @@ export default function PlayerHeader(): React.JSX.Element {
return (
<YStack flexGrow={1} justifyContent='flex-start'>
<XStack
alignContent='flex-start'
flexShrink={1}
justifyContent='center'
onPress={() => navigationRef.goBack()}
>
<XStack alignContent='flex-start' flexShrink={1} justifyContent='center'>
<MaterialDesignIcons
color={theme.color.val}
name={Platform.OS === 'android' ? 'chevron-left' : 'chevron-down'}
name={'chevron-down'}
size={22}
onPress={() => navigationRef.goBack()}
style={{ marginVertical: 'auto', width: 22 }}
/>
+2 -1
View File
@@ -37,7 +37,8 @@ export default function Root(): React.JSX.Element {
name='PlayerRoot'
component={Player}
options={{
presentation: 'modal',
presentation: 'formSheet',
sheetAllowedDetents: [1.0],
headerShown: false,
}}
/>