From 227c93b014d9f548a23e1f52295dd5fff138b6c0 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Thu, 3 Feb 2022 09:59:40 +0000 Subject: [PATCH] avoiding tracking the use case until account creation, also means we no longer need to reset the tracking value --- .../im/vector/app/features/onboarding/OnboardingViewModel.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt b/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt index 8097e90206..a4afe36c6c 100644 --- a/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/onboarding/OnboardingViewModel.kt @@ -465,13 +465,11 @@ class OnboardingViewModel @AssistedInject constructor( private fun handleUpdateUseCase(action: OnboardingAction.UpdateUseCase) { setState { copy(useCase = action.useCase) } - analyticsTracker.updateUserProperties(Identity(ftueUseCaseSelection = action.useCase.toTrackingValue())) _viewEvents.post(OnboardingViewEvents.OpenServerSelection) } private fun resetUseCase() { setState { copy(useCase = null) } - analyticsTracker.updateUserProperties(Identity(ftueUseCaseSelection = null)) } private fun handleUpdateServerType(action: OnboardingAction.UpdateServerType) { @@ -754,6 +752,7 @@ class OnboardingViewModel @AssistedInject constructor( private suspend fun onSessionCreated(session: Session) { awaitState().useCase?.let { useCase -> session.vectorStore(applicationContext).setUseCase(useCase) + analyticsTracker.updateUserProperties(Identity(ftueUseCaseSelection = useCase.toTrackingValue())) } activeSessionHolder.setActiveSession(session)