pull/508/head
gedoor 4 years ago
parent 9c50b8b9b2
commit 34ceb900fd
  1. 1
      app/src/main/java/io/legado/app/service/AudioPlayService.kt
  2. 3
      app/src/main/java/io/legado/app/service/help/AudioPlay.kt

@ -274,7 +274,6 @@ class AudioPlayService : BaseService(),
if (index == AudioPlay.durChapterIndex) {
bookChapter = chapter
subtitle = chapter.title
postEvent(EventBus.AUDIO_SUB_TITLE, subtitle)
postEvent(EventBus.AUDIO_SIZE, chapter.end?.toInt() ?: 0)
postEvent(EventBus.AUDIO_PROGRESS, position)
}

@ -123,6 +123,9 @@ object AudioPlay {
fun next(context: Context) {
Coroutine.async {
book?.let { book ->
if (book.durChapterIndex >= book.totalChapterNum) {
return@let
}
pause(context)
durChapterIndex++
durPageIndex = 0

Loading…
Cancel
Save