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