From de8d1169cee9ea33f3dc521fdc59e4422f84db12 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 4 Nov 2019 22:15:25 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/help/http/HttpHelper.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt index 745e91316..1053bc3b8 100644 --- a/app/src/main/java/io/legado/app/help/http/HttpHelper.kt +++ b/app/src/main/java/io/legado/app/help/http/HttpHelper.kt @@ -82,11 +82,13 @@ object HttpHelper { } webView.callback = object : AjaxWebView.Callback() { override fun onResult(result: String) { - block.resume(result) + if (!block.isCompleted) + block.resume(result) } override fun onError(error: Throwable) { - block.resume(error.localizedMessage) + if (!block.isCompleted) + block.resume(error.localizedMessage) } } webView.load(params)