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) {