on skip the track should start playing

This commit is contained in:
Violet Caulfield
2026-01-21 18:38:39 -06:00
parent 34026ca394
commit c0f7c97bb3

View File

@@ -37,10 +37,8 @@ export async function previous(): Promise<void> {
* @param index The track index to skip to, to skip multiple tracks
*/
export async function skip(index: number | undefined): Promise<void> {
const { state } = await TrackPlayer.getPlaybackState()
if (!isUndefined(index)) await TrackPlayer.skip(index)
else await TrackPlayer.skipToNext()
if (state === State.Playing) await TrackPlayer.play()
await TrackPlayer.play()
}