콘텐츠 플레이어 - 재생목록
- 아이템을 터치했을 때 현재 index도 같이 변경되도록 수정해서 이전/이후 재생시 현재 아이템 기준으로 이전/이후 콘텐츠가 재생되도록 수정
This commit is contained in:
parent
2d92c6a849
commit
fb60574f3d
|
@ -23,7 +23,8 @@ class AudioContentPlaylistManager(private val playlist: List<AudioContentPlaylis
|
||||||
|
|
||||||
fun findByContentId(contentId: Long): AudioContentPlaylistContent? {
|
fun findByContentId(contentId: Long): AudioContentPlaylistContent? {
|
||||||
if (playlist.isNotEmpty()) {
|
if (playlist.isNotEmpty()) {
|
||||||
return playlist.first { it.id == contentId }
|
currentIndex = playlist.indexOfFirst { it.id == contentId }
|
||||||
|
return playlist[currentIndex]
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue