From af6d50be4f9c8808f240724b2f17392f90f2f3b6 Mon Sep 17 00:00:00 2001 From: 821938089 <821938089@qq.com> Date: Sun, 10 Jul 2022 09:26:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/legado/app/ui/book/read/ReadBookViewModel.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt index 59cf27d53..ef1ea642a 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/ReadBookViewModel.kt @@ -147,12 +147,10 @@ class ReadBookViewModel(application: Application) : BaseViewModel(application) { } } else { ReadBook.bookSource?.let { - viewModelScope.launch { - withContext(IO) { - val preUpdateJs = it.ruleToc?.preUpdateJs - if (!preUpdateJs.isNullOrBlank()) { - AnalyzeRule(book, it).evalJS(preUpdateJs) - } + viewModelScope.launch(IO) { + val preUpdateJs = it.ruleToc?.preUpdateJs + if (!preUpdateJs.isNullOrBlank()) { + AnalyzeRule(book, it).evalJS(preUpdateJs) } WebBook.getChapterList(viewModelScope, it, book) .onSuccess(IO) { cList ->