handle notification click link

also correctly handle back on now playing from app open
standardize route names
This commit is contained in:
austinried
2021-07-27 20:38:28 +09:00
parent 25cea64f1d
commit ff0464a156
14 changed files with 120 additions and 87 deletions

View File

@@ -57,13 +57,13 @@ const ListItem: React.FC<{
if (!onPress) {
switch (item.itemType) {
case 'album':
onPress = () => navigation.navigate('AlbumView', { id: item.id, title: item.name })
onPress = () => navigation.navigate('album', { id: item.id, title: item.name })
break
case 'artist':
onPress = () => navigation.navigate('ArtistView', { id: item.id, title: item.name })
onPress = () => navigation.navigate('artist', { id: item.id, title: item.name })
break
case 'playlist':
onPress = () => navigation.navigate('PlaylistView', { id: item.id, title: item.name })
onPress = () => navigation.navigate('playlist', { id: item.id, title: item.name })
break
}
}

View File

@@ -64,7 +64,7 @@ const NowPlayingBar = () => {
return (
<Pressable
onPress={() => navigation.navigate('NowPlaying')}
onPress={() => navigation.navigate('now-playing')}
style={{ ...styles.container, display: track ? 'flex' : 'none' }}>
<ProgressBar />
<View style={styles.subContainer}>