From d04ded391069981838bf95e44f405ef2d39b95a1 Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 18 Feb 2020 16:02:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/legado/app/model/webBook/BookChapterList.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt b/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt index b943c3873..ff3467a8a 100644 --- a/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt +++ b/app/src/main/java/io/legado/app/model/webBook/BookChapterList.kt @@ -12,9 +12,9 @@ import io.legado.app.model.Debug import io.legado.app.model.analyzeRule.AnalyzeRule import io.legado.app.model.analyzeRule.AnalyzeUrl import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.suspendCancellableCoroutine import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException -import kotlin.coroutines.suspendCoroutine object BookChapterList { @@ -24,7 +24,7 @@ object BookChapterList { body: String?, bookSource: BookSource, baseUrl: String - ): List = suspendCoroutine { block -> + ): List = suspendCancellableCoroutine { block -> try { val chapterList = ArrayList() body ?: throw Exception(