From b11af054c5c3e21854066ca1a0ae4a2a45fbadf5 Mon Sep 17 00:00:00 2001 From: Horis <821938089@qq.com> Date: Fri, 16 Feb 2024 15:58:22 +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 --- app/src/main/java/io/legado/app/model/ReadBook.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/ReadBook.kt b/app/src/main/java/io/legado/app/model/ReadBook.kt index 1294454de..2fee95c8d 100644 --- a/app/src/main/java/io/legado/app/model/ReadBook.kt +++ b/app/src/main/java/io/legado/app/model/ReadBook.kt @@ -14,6 +14,7 @@ import io.legado.app.help.book.isLocal import io.legado.app.help.config.AppConfig import io.legado.app.help.config.ReadBookConfig import io.legado.app.help.coroutine.Coroutine +import io.legado.app.help.globalExecutor import io.legado.app.model.localBook.TextFile import io.legado.app.model.webBook.WebBook import io.legado.app.service.BaseReadAloudService @@ -29,8 +30,6 @@ import kotlinx.coroutines.cancelChildren import kotlinx.coroutines.delay import kotlinx.coroutines.launch import splitties.init.appCtx -import java.util.concurrent.ExecutorService -import java.util.concurrent.Executors import kotlin.math.min @@ -65,7 +64,7 @@ object ReadBook : CoroutineScope by MainScope() { val downloadFailChapters = hashMapOf() var contentProcessor: ContentProcessor? = null val downloadScope = CoroutineScope(SupervisorJob() + IO) - val executor: ExecutorService = Executors.newSingleThreadExecutor() + val executor = globalExecutor //暂时保存跳转前进度 fun saveCurrentBookProcess() {