From e02d3e571d86af7ad71868950f2735ef3091be56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Sat, 16 May 2020 20:52:16 +0200 Subject: [PATCH] [API/Librus] Fix some more captcha errors. --- .../api/edziennik/librus/login/LibrusLoginMessages.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/login/LibrusLoginMessages.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/login/LibrusLoginMessages.kt index 4a994472..9bfad99f 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/login/LibrusLoginMessages.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/login/LibrusLoginMessages.kt @@ -38,14 +38,18 @@ class LibrusLoginMessages(val data: DataLibrus, val onSuccess: () -> Unit) { text?.contains("grecaptcha.ready") == true -> { val url = response?.request()?.url()?.toString() ?: run { - data.error(TAG, ERROR_LIBRUS_MESSAGES_OTHER, response, text) + //data.error(TAG, ERROR_LIBRUS_MESSAGES_OTHER, response, text) + data.messagesLoginSuccessful = false + onSuccess() return } LibrusRecaptchaHelper(data.app, url, text, onSuccess = { newUrl -> loginWithSynergia(newUrl) }, onTimeout = { - data.error(TAG, ERROR_LOGIN_LIBRUS_MESSAGES_TIMEOUT, response, text) + //data.error(TAG, ERROR_LOGIN_LIBRUS_MESSAGES_TIMEOUT, response, text) + data.messagesLoginSuccessful = false + onSuccess() }) }