Merge branch 'master' of github.com:gedoor/legado

pull/508/head
fisher 4 years ago
commit bef066e713
  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