Skip to content

Commit 44fb84a

Browse files
committed
Update
1 parent ff2ff4f commit 44fb84a

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

app/src/main/java/one/mixin/android/ui/landing/MnemonicPhraseFragment.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ class MnemonicPhraseFragment : BaseFragment(R.layout.fragment_compose) {
214214
)
215215
(view as ViewGroup).addView(captchaView?.webView, MATCH_PARENT, MATCH_PARENT)
216216
}
217-
captchaView?.loadCaptcha(if (errorDescription.containsIgnoreCase("geetest")) CaptchaView.CaptchaType.GTCaptcha else CaptchaView.CaptchaType.GCaptcha)
217+
captchaView?.loadCaptcha(
218+
if (errorDescription.containsIgnoreCase("GeeTest")) CaptchaView.CaptchaType.GTCaptcha
219+
else if (errorDescription.containsIgnoreCase("hCaptcha")) CaptchaView.CaptchaType.HCaptcha
220+
else CaptchaView.CaptchaType.GCaptcha
221+
)
218222
}
219223

220224
private fun reSend(sessionKey: EdKeyPair, edKey: EdKeyPair, messageHex: String, signatureHex: String, hCaptchaResponse: String? = null, gRecaptchaResponse: String? = null, gtRecaptchaResponse: String? = null) {

app/src/main/java/one/mixin/android/ui/landing/MobileFragment.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,11 @@ class MobileFragment: BaseFragment(R.layout.fragment_mobile) {
346346
} else if (from == FROM_LANDING) {
347347
AnalyticsTracker.trackLoginCaptcha("mnemonic_phrase")
348348
}
349-
captchaView?.loadCaptcha(if (errorDescription.containsIgnoreCase("geetest")) CaptchaView.CaptchaType.GTCaptcha else CaptchaView.CaptchaType.GCaptcha)
349+
captchaView?.loadCaptcha(
350+
if (errorDescription.containsIgnoreCase("GeeTest")) CaptchaView.CaptchaType.GTCaptcha
351+
else if (errorDescription.containsIgnoreCase("hCaptcha")) CaptchaView.CaptchaType.HCaptcha
352+
else CaptchaView.CaptchaType.GCaptcha
353+
)
350354
}
351355

352356
private fun hideLoading() {

app/src/main/java/one/mixin/android/ui/landing/VerificationFragment.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,11 @@ class VerificationFragment : PinCodeFragment(R.layout.fragment_verification) {
371371
)
372372
(view as ViewGroup).addView(captchaView?.webView, MATCH_PARENT, MATCH_PARENT)
373373
}
374-
captchaView?.loadCaptcha(if (errorDescription.containsIgnoreCase("geetest")) CaptchaView.CaptchaType.GTCaptcha else CaptchaView.CaptchaType.GCaptcha)
374+
captchaView?.loadCaptcha(
375+
if (errorDescription.containsIgnoreCase("GeeTest")) CaptchaView.CaptchaType.GTCaptcha
376+
else if (errorDescription.containsIgnoreCase("hCaptcha")) CaptchaView.CaptchaType.HCaptcha
377+
else CaptchaView.CaptchaType.GCaptcha
378+
)
375379
}
376380

377381
private fun startCountDown() {

app/src/main/java/one/mixin/android/ui/setting/delete/DeleteAccountFragment.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,11 @@ class DeleteAccountFragment : BaseFragment(R.layout.fragment_delete_account) {
263263
ViewGroup.LayoutParams.MATCH_PARENT,
264264
)
265265
}
266-
captchaView?.loadCaptcha(if (errorDescription.containsIgnoreCase("geetest")) CaptchaView.CaptchaType.GTCaptcha else CaptchaView.CaptchaType.GCaptcha)
266+
captchaView?.loadCaptcha(
267+
if (errorDescription.containsIgnoreCase("GeeTest")) CaptchaView.CaptchaType.GTCaptcha
268+
else if (errorDescription.containsIgnoreCase("hCaptcha")) CaptchaView.CaptchaType.HCaptcha
269+
else CaptchaView.CaptchaType.GCaptcha
270+
)
267271
}
268272

269273
private fun changeNumber() {

0 commit comments

Comments
 (0)