pull/46/head
kunfei 5 years ago
parent 1d0332207d
commit de8d1169ce
  1. 6
      app/src/main/java/io/legado/app/help/http/HttpHelper.kt

@ -82,11 +82,13 @@ object HttpHelper {
} }
webView.callback = object : AjaxWebView.Callback() { webView.callback = object : AjaxWebView.Callback() {
override fun onResult(result: String) { override fun onResult(result: String) {
block.resume(result) if (!block.isCompleted)
block.resume(result)
} }
override fun onError(error: Throwable) { override fun onError(error: Throwable) {
block.resume(error.localizedMessage) if (!block.isCompleted)
block.resume(error.localizedMessage)
} }
} }
webView.load(params) webView.load(params)

Loading…
Cancel
Save