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

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

Loading…
Cancel
Save