Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
264 changes: 91 additions & 173 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions packages/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@
"@react-native-community/slider": "4.5.0",
"@react-native-documents/picker": "^10.1.2",
"@react-native-masked-view/masked-view": "^0.3.2",
"@react-navigation/bottom-tabs": "^7.8.12",
"@react-navigation/core": "^7.13.6",
"@react-navigation/drawer": "^7.7.9",
"@react-navigation/material-top-tabs": "^7.4.9",
"@react-navigation/native": "^7.1.25",
"@react-navigation/native-stack": "^7.8.6",
"@react-navigation/stack": "^7.6.12",
"@react-navigation/bottom-tabs": "6.5.11",
"@react-navigation/core": "^7.13.3",
"@react-navigation/drawer": "6.6.6",
"@react-navigation/material-top-tabs": "6.6.5",
"@react-navigation/native": "^7.1.14",
"@react-navigation/native-stack": "6.9.17",
"@react-navigation/stack": "^7.4.2",
"@redux-devtools/remote": "0.8.0",
"@reduxjs/toolkit": "1.6.1",
"@shopify/flash-list": "^1.8.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,8 @@ export const NowPlayingDrawer = memo(function NowPlayingDrawer(
if (!trackId) {
return
}
navigation?.push('Track', { trackId })
onClose()
navigation?.push('Track', { trackId })
}, [onClose, navigation, trackId])

return (
Expand Down
15 changes: 14 additions & 1 deletion packages/mobile/src/components/now-playing-drawer/TrackInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useCallback } from 'react'

import { useGatedContentAccess } from '@audius/common/hooks'
import type { Track, User } from '@audius/common/models'
import { playerSelectors } from '@audius/common/store'
Expand All @@ -7,6 +9,7 @@ import { useSelector } from 'react-redux'

import { LockedStatusBadge, Text } from 'app/components/core'
import { useDrawer } from 'app/hooks/useDrawer'
import { useNavigation } from 'app/hooks/useNavigation'
import { makeStyles } from 'app/styles'
import type { GestureResponderHandler } from 'app/types/gesture'

Expand Down Expand Up @@ -48,13 +51,19 @@ export const TrackInfo = (props: TrackInfoProps) => {
const styles = useStyles()
const { hasStreamAccess } = useGatedContentAccess(track)
const { onClose } = useDrawer('NowPlaying')
const navigation = useNavigation()
const isPreviewing = useSelector(getPreviewing)
const shouldShowPreviewLock =
isPreviewing ||
(track?.stream_conditions &&
'usdc_purchase' in track.stream_conditions &&
!hasStreamAccess)

const handlePressArtist = useCallback(() => {
onClose()
navigation?.push('Profile', { id: user?.user_id })
}, [navigation, user?.user_id, onClose])

if (!user || !track) return null

const { user_id } = user
Expand All @@ -77,7 +86,11 @@ export const TrackInfo = (props: TrackInfoProps) => {
</View>
) : null}
</TouchableOpacity>
<UserLink variant='visible' userId={user_id} onPress={onClose} />
<UserLink
variant='visible'
userId={user_id}
onPress={handlePressArtist}
/>
</View>
)
}
Loading
Loading