pull/1771/head
kunfei 3 years ago
parent d5e7d05e47
commit 0aa87f3fde
  1. 1
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
  2. 2
      app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt

@ -54,7 +54,6 @@ class BookInfoActivity :
viewModel.bookData.value?.let { book ->
launch {
withContext(IO) {
viewModel.durChapterIndex = it.first
book.durChapterIndex = it.first
book.durChapterPos = it.second
appDb.bookDao.update(book)

@ -27,7 +27,6 @@ import kotlinx.coroutines.Dispatchers.IO
class BookInfoViewModel(application: Application) : BaseViewModel(application) {
val bookData = MutableLiveData<Book>()
val chapterListData = MutableLiveData<List<BookChapter>>()
var durChapterIndex = 0
var inBookshelf = false
var bookSource: BookSource? = null
private var changeSourceCoroutine: Coroutine<*>? = null
@ -70,7 +69,6 @@ class BookInfoViewModel(application: Application) : BaseViewModel(application) {
private fun upBook(book: Book) {
execute {
durChapterIndex = book.durChapterIndex
bookData.postValue(book)
upCoverByRule(book)
bookSource = if (book.isLocalBook()) null else

Loading…
Cancel
Save