pull/525/head
gedoor 4 years ago
parent e297b92c41
commit 56b85eeb92
  1. 1
      app/src/main/java/io/legado/app/service/help/AudioPlay.kt
  2. 3
      app/src/main/java/io/legado/app/ui/audio/AudioPlayViewModel.kt

@ -21,7 +21,6 @@ object AudioPlay {
var book: Book? = null
var durChapter: BookChapter? = null
var inBookshelf = false
var chapterSize = 0
var durChapterIndex = 0
var durChapterPos = 0
var webBook: WebBook? = null

@ -51,7 +51,6 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application)
}
durChapter = App.db.bookChapterDao.getChapter(book.bookUrl, durChapterIndex)
upDurChapter(book)
chapterSize = count
}
}
saveRead()
@ -81,7 +80,6 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application)
if (cList.isNotEmpty()) {
if (changeDruChapterIndex == null) {
App.db.bookChapterDao.insert(*cList.toTypedArray())
AudioPlay.chapterSize = cList.size
} else {
changeDruChapterIndex(cList)
}
@ -132,7 +130,6 @@ class AudioPlayViewModel(application: Application) : BaseViewModel(application)
book.durChapterTitle = chapters[AudioPlay.durChapterIndex].title
App.db.bookDao.update(book)
App.db.bookChapterDao.insert(*chapters.toTypedArray())
AudioPlay.chapterSize = chapters.size
}
}

Loading…
Cancel
Save