Closed 18801261807 closed 3 years ago
列表播放模式,最后一首播放完,会自动返回第一首 大概是这个方法引起的 fun currSongIsLastSong(): Boolean { val lastSong = provider.getSongInfoByIndex(currentQueueSize - 1) return getCurrentSongInfo(true)?.songId == lastSong?.songId }
currentQueueSize 始终为0
改成这样就可以了 fun currSongIsLastSong(): Boolean { val songlist :List = provider.songList val lastSong = provider.getSongInfoByIndex(songlist.size - 1) return getCurrentSongInfo(true)?.songId == lastSong?.songId } 没有太多时间深入了解了,您也试一下,麻烦了
hao
列表播放模式,最后一首播放完,会自动返回第一首 大概是这个方法引起的 fun currSongIsLastSong(): Boolean { val lastSong = provider.getSongInfoByIndex(currentQueueSize - 1) return getCurrentSongInfo(true)?.songId == lastSong?.songId }
currentQueueSize 始终为0
改成这样就可以了 fun currSongIsLastSong(): Boolean { val songlist :List = provider.songList
val lastSong = provider.getSongInfoByIndex(songlist.size - 1)
return getCurrentSongInfo(true)?.songId == lastSong?.songId
}
没有太多时间深入了解了,您也试一下,麻烦了