offset audio after playback and add songs
This commit is contained in:
@@ -129,6 +129,17 @@ const AllMyPlaylist = ({ route }) => {
|
||||
})
|
||||
}
|
||||
|
||||
const openAddTracks = useCallback(() => {
|
||||
if (!selectedPlaylistId) return
|
||||
|
||||
SheetManager.show('PlaylistAddTracks', {
|
||||
payload: {
|
||||
playlistId: selectedPlaylistId,
|
||||
existingMusicIds: Array.isArray(playlist?.musics) ? playlist.musics : [],
|
||||
},
|
||||
})
|
||||
}, [playlist?.musics, selectedPlaylistId])
|
||||
|
||||
return (
|
||||
<Page
|
||||
headerType="NAVIGATION"
|
||||
@@ -141,9 +152,18 @@ const AllMyPlaylist = ({ route }) => {
|
||||
rightComponent={() => (
|
||||
<>
|
||||
{selectedPlaylistId != null && (
|
||||
<Pressable onPress={confirmDelete}>
|
||||
<Image source={icons.trash} style={{ width: 24, height: 24 }} />
|
||||
</Pressable>
|
||||
<View style={{ flexDirection: 'row', alignItems: 'center', gap: 10 }}>
|
||||
<Pressable onPress={openAddTracks}>
|
||||
<BlurView intensity={20} tint="dark" style={styles.addTracksButton}>
|
||||
<Text numberOfLines={1} style={styles.addTracksText}>
|
||||
Ajouter des morceaux
|
||||
</Text>
|
||||
</BlurView>
|
||||
</Pressable>
|
||||
<Pressable onPress={confirmDelete}>
|
||||
<Image source={icons.trash} style={{ width: 24, height: 24 }} />
|
||||
</Pressable>
|
||||
</View>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
@@ -288,3 +308,18 @@ const AllMyPlaylist = ({ route }) => {
|
||||
}
|
||||
|
||||
export default AllMyPlaylist
|
||||
|
||||
const styles = {
|
||||
addTracksButton: {
|
||||
paddingHorizontal: 12,
|
||||
paddingVertical: 8,
|
||||
borderRadius: 999,
|
||||
overflow: 'hidden',
|
||||
backgroundColor: Palette.glass,
|
||||
},
|
||||
addTracksText: {
|
||||
color: Palette.white,
|
||||
fontSize: 12,
|
||||
fontFamily: FONT_FAMILY.InterSemiBold,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user