Fix: Reset not flagging ReCaptcha as ready-to-execute

fix #36
This commit is contained in:
Flávio Caetano 2018-04-27 17:22:04 -03:00
parent 5989547f40
commit 9d061aaaff
2 changed files with 7 additions and 1 deletions

View File

@ -78,7 +78,7 @@
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""

View File

@ -89,6 +89,11 @@ internal class ReCaptchaWebViewManager {
}
}
}
/// Flags all requests as finished
func reset() {
activeRequests.removeAll()
}
}
fileprivate struct Constants {
@ -206,6 +211,7 @@ internal class ReCaptchaWebViewManager {
*/
func reset() {
didFinishLoading = false
webviewDelegate.reset()
webView.evaluateJavaScript(Constants.ResetCommand) { [weak self] _, error in
if let error = error {