From fbee6a9dd3bf7b5638c8bebbaee4618b36f3f10f Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 26 Sep 2021 13:59: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 --- app/src/main/java/io/legado/app/help/http/BackstageWebView.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt b/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt index bfcb5dae7..9fedea7fa 100644 --- a/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt +++ b/app/src/main/java/io/legado/app/help/http/BackstageWebView.kt @@ -35,7 +35,9 @@ class BackstageWebView( suspend fun getStrResponse(): StrResponse = suspendCancellableCoroutine { block -> block.invokeOnCancellation { - destroy() + runOnUI { + destroy() + } } callback = object : BackstageWebView.Callback() { override fun onResult(response: StrResponse) {