From 2eeba285e89bc8dd200e19da8ab42ad15fd30324 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 14 Jun 2022 13:50:42 +0100 Subject: [PATCH] only hide the connect to server option when the new FTUE journey is enabled --- .../features/onboarding/ftueauth/FtueAuthUseCaseFragment.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthUseCaseFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthUseCaseFragment.kt index bd5793f195..289aa811d6 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthUseCaseFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthUseCaseFragment.kt @@ -28,13 +28,14 @@ import androidx.annotation.ColorRes import androidx.annotation.DrawableRes import androidx.annotation.StringRes import androidx.core.content.ContextCompat -import androidx.core.view.isVisible +import androidx.core.view.isGone import im.vector.app.R import im.vector.app.core.extensions.getResTintedDrawable import im.vector.app.core.extensions.getTintedDrawable import im.vector.app.core.extensions.setLeftDrawable import im.vector.app.core.extensions.setTextWithColoredPart import im.vector.app.databinding.FragmentFtueAuthUseCaseBinding +import im.vector.app.features.VectorFeatures import im.vector.app.features.login.ServerType import im.vector.app.features.onboarding.FtueUseCase import im.vector.app.features.onboarding.OnboardingAction @@ -46,6 +47,7 @@ private const val LIGHT_MODE_ICON_BACKGROUND_ALPHA = 0.15f class FtueAuthUseCaseFragment @Inject constructor( private val themeProvider: ThemeProvider, + private val vectorFeatures: VectorFeatures, ) : AbstractFtueAuthFragment() { override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentFtueAuthUseCaseBinding { @@ -59,7 +61,7 @@ class FtueAuthUseCaseFragment @Inject constructor( private fun setupViews() { // Connect to server relies on https://github.com/vector-im/element-android/issues/5782 - views.useCaseConnectToServerGroup.isVisible = false + views.useCaseConnectToServerGroup.isGone = vectorFeatures.isOnboardingCombinedRegisterEnabled() views.useCaseOptionOne.renderUseCase( useCase = FtueUseCase.FRIENDS_FAMILY,