pull/78/head
kunfei 5 years ago
parent 03c58f35f7
commit cb7bad6c0f
  1. 8
      app/src/main/java/io/legado/app/ui/book/info/BookInfoActivity.kt
  2. 1
      app/src/main/java/io/legado/app/ui/book/info/BookInfoViewModel.kt

@ -298,7 +298,13 @@ class BookInfoActivity :
}
requestCodeChapterList -> if (resultCode == Activity.RESULT_OK) {
viewModel.bookData.value?.let {
readBook(it)
data?.getIntExtra("index", it.durChapterIndex)?.let { index ->
if (it.durChapterIndex != index) {
it.durChapterIndex = index
it.durChapterPos = 0
}
readBook(it)
}
}
}
}

@ -14,7 +14,6 @@ import io.legado.app.model.WebBook
import kotlinx.coroutines.Dispatchers.IO
class BookInfoViewModel(application: Application) : BaseViewModel(application) {
val bookData = MutableLiveData<Book>()
val chapterListData = MutableLiveData<List<BookChapter>>()
val isLoadingData = MutableLiveData<Boolean>()

Loading…
Cancel
Save