From fca06bd167255ae44b539095e6f77e1127d1f8b4 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 13 Jun 2022 08:52:57 +0100 Subject: [PATCH 1/2] always showing the celebration confetti on account creation - previously we would wait until after personalisation but we don't know if users will go through that flow --- .../ftueauth/FtueAuthAccountCreatedFragment.kt | 2 +- .../FtueAuthPersonalizationCompleteFragment.kt | 11 ----------- .../layout/fragment_ftue_personalization_complete.xml | 6 ------ 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthAccountCreatedFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthAccountCreatedFragment.kt index b8114b5d94..ded9cb00fa 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthAccountCreatedFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthAccountCreatedFragment.kt @@ -58,7 +58,7 @@ class FtueAuthAccountCreatedFragment @Inject constructor( views.personalizeButtonGroup.isVisible = canPersonalize views.takeMeHomeButtonGroup.isVisible = !canPersonalize - if (!hasPlayedConfetti && !canPersonalize && requireContext().isAnimationEnabled()) { + if (!hasPlayedConfetti && requireContext().isAnimationEnabled()) { hasPlayedConfetti = true views.viewKonfetti.isVisible = true views.viewKonfetti.play() diff --git a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthPersonalizationCompleteFragment.kt b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthPersonalizationCompleteFragment.kt index 074f58864e..8e88a6ed46 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthPersonalizationCompleteFragment.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/ftueauth/FtueAuthPersonalizationCompleteFragment.kt @@ -20,9 +20,6 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import androidx.core.view.isVisible -import im.vector.app.core.animations.play -import im.vector.app.core.utils.isAnimationEnabled import im.vector.app.databinding.FragmentFtuePersonalizationCompleteBinding import im.vector.app.features.onboarding.OnboardingAction import im.vector.app.features.onboarding.OnboardingViewEvents @@ -30,8 +27,6 @@ import javax.inject.Inject class FtueAuthPersonalizationCompleteFragment @Inject constructor() : AbstractFtueAuthFragment() { - private var hasPlayedConfetti = false - override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentFtuePersonalizationCompleteBinding { return FragmentFtuePersonalizationCompleteBinding.inflate(inflater, container, false) } @@ -43,12 +38,6 @@ class FtueAuthPersonalizationCompleteFragment @Inject constructor() : AbstractFt private fun setupViews() { views.personalizationCompleteCta.debouncedClicks { viewModel.handle(OnboardingAction.PostViewEvent(OnboardingViewEvents.OnTakeMeHome)) } - - if (!hasPlayedConfetti && requireContext().isAnimationEnabled()) { - hasPlayedConfetti = true - views.viewKonfetti.isVisible = true - views.viewKonfetti.play() - } } override fun resetViewModel() { diff --git a/vector/src/main/res/layout/fragment_ftue_personalization_complete.xml b/vector/src/main/res/layout/fragment_ftue_personalization_complete.xml index 8653d3f40d..9a045a299b 100644 --- a/vector/src/main/res/layout/fragment_ftue_personalization_complete.xml +++ b/vector/src/main/res/layout/fragment_ftue_personalization_complete.xml @@ -106,10 +106,4 @@ app:layout_constraintHeight_percent="0.05" app:layout_constraintTop_toBottomOf="@id/personalizationCompleteCta" /> - - From b3adad85438042f0923123a66837c63f3f041ff1 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 13 Jun 2022 11:33:51 +0100 Subject: [PATCH 2/2] hiding connect to server button in favour of handling as part of the FTUE v2 work --- .../features/onboarding/ftueauth/FtueAuthUseCaseFragment.kt | 4 ++++ vector/src/main/res/layout/fragment_ftue_auth_use_case.xml | 6 ++++++ 2 files changed, 10 insertions(+) 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 35439a794e..bd5793f195 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,6 +28,7 @@ import androidx.annotation.ColorRes import androidx.annotation.DrawableRes import androidx.annotation.StringRes import androidx.core.content.ContextCompat +import androidx.core.view.isVisible import im.vector.app.R import im.vector.app.core.extensions.getResTintedDrawable import im.vector.app.core.extensions.getTintedDrawable @@ -57,6 +58,9 @@ 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.useCaseOptionOne.renderUseCase( useCase = FtueUseCase.FRIENDS_FAMILY, label = R.string.ftue_auth_use_case_option_one, diff --git a/vector/src/main/res/layout/fragment_ftue_auth_use_case.xml b/vector/src/main/res/layout/fragment_ftue_auth_use_case.xml index 76f29aaab9..a561e38d01 100644 --- a/vector/src/main/res/layout/fragment_ftue_auth_use_case.xml +++ b/vector/src/main/res/layout/fragment_ftue_auth_use_case.xml @@ -153,6 +153,12 @@ app:layout_constraintHeight_min="16dp" app:layout_constraintTop_toBottomOf="@id/useCaseSkip" /> + +