Skip to content

Commit 6242aa8

Browse files
committed
Fix: removeFromQueue & console log & Add: title in Info
1 parent 4cf17e2 commit 6242aa8

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

app/screens/Explorer/SongExplorer.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ const SongExplorer = () => {
3939
setIsLoading(false)
4040
const newSongs = json?.searchResult3?.song || []
4141
if (newSongs.length === 0) return
42-
console.log('Fetched songs:', newSongs.length, 'at offset:', offset)
4342
setSongs(prev => [...prev, ...newSongs])
4443
})
4544
.catch(error => {

app/screens/Info.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { View, ScrollView } from 'react-native';
2+
import { View, ScrollView, Text } from 'react-native';
33
import { useSafeAreaInsets } from 'react-native-safe-area-context';
44
import { useTranslation } from 'react-i18next';
55

@@ -36,6 +36,11 @@ const Info = ({ route: { params: { info } } }) => {
3636
}}
3737
source={{ uri: urlCover(config, info) }}
3838
/>
39+
<Text style={[ mainStyles.largeText(theme.primaryText), {
40+
textAlign: 'center',
41+
marginTop: 15,
42+
paddingHorizontal: 30,
43+
}]}>{info.title || info.name}</Text>
3944
<View style={[settingStyles.contentMainContainer, { marginTop: 30 }]}>
4045
<View style={settingStyles.optionsContainer(theme)}>
4146
{

app/utils/player.native.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,7 @@ export const resetAudio = (songDispatch) => {
219219
}
220220

221221
export const removeFromQueue = async (songDispatch, index) => {
222-
const queue = await TrackPlayer.getQueue()
223-
TrackPlayer.remove(queue[index])
222+
await TrackPlayer.remove(index)
224223
songDispatch({ type: 'removeFromQueue', index })
225224
}
226225

0 commit comments

Comments
 (0)