@ -45,7 +45,7 @@ class AudioPlayActivity : VMBaseActivity<AudioPlayViewModel>(R.layout.activity_a
true
}
iv_skip_next.onClick {
viewModel.moveToNext()
iv_skip_previous.onClick {
@ -184,6 +184,17 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application)
fun moveToPrev() {
if (durChapterIndex > 0) {
durChapterIndex--
bookData.value?.let {
it.durChapterIndex = durChapterIndex
saveRead(it)
loadContent(it, durChapterIndex)
fun moveToNext() {
if (durChapterIndex < chapterSize - 1) {
durChapterIndex++