diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedLoginFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedLoginFragment.kt index c2d2346765..75b73f887e 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedLoginFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedLoginFragment.kt @@ -139,8 +139,8 @@ class FtueAuthCombinedLoginFragment @Inject constructor( } private fun renderSsoProviders(deviceId: String?, ssoProviders: List?) { - views.ssoGroup.isVisible = ssoProviders?.isNotEmpty() == true - views.ssoButtonsHeader.isVisible = views.ssoGroup.isVisible && views.loginEntryGroup.isVisible + views.ssoGroup.isVisible = true + views.ssoButtonsHeader.isVisible = isUsernameAndPasswordVisible() views.ssoButtons.render(ssoProviders, SocialLoginButtonsView.Mode.MODE_CONTINUE) { id -> viewModel.fetchSsoUrl( redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL, @@ -163,6 +163,8 @@ class FtueAuthCombinedLoginFragment @Inject constructor( views.loginEntryGroup.isVisible = true } + private fun isUsernameAndPasswordVisible() = views.loginEntryGroup.isVisible + private fun setupAutoFill() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { views.loginInput.setAutofillHints(HintConstants.AUTOFILL_HINT_NEW_USERNAME) diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedRegisterFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedRegisterFragment.kt index 8340fb903a..7338de163b 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedRegisterFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthCombinedRegisterFragment.kt @@ -211,7 +211,7 @@ class FtueAuthCombinedRegisterFragment @Inject constructor() : AbstractSSOFtueAu } private fun renderSsoProviders(deviceId: String?, ssoProviders: List?) { - views.ssoGroup.isVisible = ssoProviders?.isNotEmpty() == true + views.ssoGroup.isVisible = true views.ssoButtons.render(ssoProviders, SocialLoginButtonsView.Mode.MODE_CONTINUE) { provider -> viewModel.fetchSsoUrl( redirectUrl = SSORedirectRouterActivity.VECTOR_REDIRECT_URL,