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) { if (index == AudioPlay.durChapterIndex) {
bookChapter = chapter bookChapter = chapter
subtitle = chapter.title subtitle = chapter.title
postEvent(EventBus.AUDIO_SUB_TITLE, subtitle)
postEvent(EventBus.AUDIO_SIZE, chapter.end?.toInt() ?: 0) postEvent(EventBus.AUDIO_SIZE, chapter.end?.toInt() ?: 0)
postEvent(EventBus.AUDIO_PROGRESS, position) postEvent(EventBus.AUDIO_PROGRESS, position)
} }

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

Loading…
Cancel
Save