mirror of
https://github.com/anultravioletaurora/Jellify.git
synced 2026-05-05 04:59:30 -05:00
add ability to swipe to dismiss the player modal (#718)
This commit is contained in:
@@ -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 }}
|
||||
/>
|
||||
|
||||
|
||||
@@ -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,
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user