pull/2048/head
821938089 2 years ago
parent e233acc3af
commit af6d50be4f
  1. 4
      app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt

@ -147,13 +147,11 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) {
}
} else {
ReadBook.bookSource?.let {
viewModelScope.launch {
withContext(IO) {
viewModelScope.launch(IO) {
val preUpdateJs = it.ruleToc?.preUpdateJs
if (!preUpdateJs.isNullOrBlank()) {
AnalyzeRule(book, it).evalJS(preUpdateJs)
}
}
WebBook.getChapterList(viewModelScope, it, book)
.onSuccess(IO) { cList ->
appDb.bookChapterDao.insert(*cList.toTypedArray())

Loading…
Cancel
Save