only hide the connect to server option when the new FTUE journey is enabled

This commit is contained in:
Adam Brown 2022-06-14 13:50:42 +01:00
parent 10eebff8a6
commit 2eeba285e8

View file

@ -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<FragmentFtueAuthUseCaseBinding>() {
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,