pull/1352/head
gedoor 3 years ago
parent 683fc3bef8
commit fbee6a9dd3
  1. 2
      app/src/main/java/io/legado/app/help/http/BackstageWebView.kt

@ -35,8 +35,10 @@ class BackstageWebView(
suspend fun getStrResponse(): StrResponse = suspendCancellableCoroutine { block -> suspend fun getStrResponse(): StrResponse = suspendCancellableCoroutine { block ->
block.invokeOnCancellation { block.invokeOnCancellation {
runOnUI {
destroy() destroy()
} }
}
callback = object : BackstageWebView.Callback() { callback = object : BackstageWebView.Callback() {
override fun onResult(response: StrResponse) { override fun onResult(response: StrResponse) {
if (!block.isCompleted) if (!block.isCompleted)

Loading…
Cancel
Save