diff --git a/app/src/main/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModel.kt b/app/src/main/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModel.kt index 85f41060d40..e487c6f07e0 100644 --- a/app/src/main/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModel.kt +++ b/app/src/main/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModel.kt @@ -98,7 +98,11 @@ class SelfUserProfileViewModel @Inject constructor( private val notificationManager: WireNotificationManager, private val globalDataStore: GlobalDataStore, private val qualifiedIdMapper: QualifiedIdMapper, +<<<<<<< HEAD private val anonymousAnalyticsManager: AnonymousAnalyticsManager +======= + private val analyticsManager: AnonymousAnalyticsManager +>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664)) ) : ViewModel() { var userProfileState by mutableStateOf(SelfUserProfileState(userId = selfUserId, isAvatarLoading = true)) @@ -310,6 +314,7 @@ class SelfUserProfileViewModel @Inject constructor( } fun trackQrCodeClick() { +<<<<<<< HEAD anonymousAnalyticsManager.sendEvent(AnalyticsEvent.QrCode.Click(!userProfileState.teamName.isNullOrBlank())) } @@ -319,6 +324,9 @@ class SelfUserProfileViewModel @Inject constructor( createTeamButtonClicked = true ) ) +======= + analyticsManager.sendEvent(AnalyticsEvent.QrCode.Click(!userProfileState.teamName.isNullOrBlank())) +>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664)) } sealed class ErrorCodes { diff --git a/app/src/test/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModelArrangement.kt b/app/src/test/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModelArrangement.kt index 5c58262e8de..b6dd833a290 100644 --- a/app/src/test/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModelArrangement.kt +++ b/app/src/test/kotlin/com/wire/android/ui/userprofile/self/SelfUserProfileViewModelArrangement.kt @@ -99,7 +99,11 @@ class SelfUserProfileViewModelArrangement { lateinit var qualifiedIdMapper: QualifiedIdMapper @MockK +<<<<<<< HEAD lateinit var anonymousAnalyticsManager: AnonymousAnalyticsManager +======= + lateinit var analyticsManager: AnonymousAnalyticsManager +>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664)) private val viewModel by lazy { SelfUserProfileViewModel( @@ -121,7 +125,11 @@ class SelfUserProfileViewModelArrangement { notificationManager = notificationManager, globalDataStore = globalDataStore, qualifiedIdMapper = qualifiedIdMapper, +<<<<<<< HEAD anonymousAnalyticsManager = anonymousAnalyticsManager +======= + analyticsManager = analyticsManager +>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664)) ) } diff --git a/core/analytics/src/main/kotlin/com/wire/android/feature/analytics/model/AnalyticsEvent.kt b/core/analytics/src/main/kotlin/com/wire/android/feature/analytics/model/AnalyticsEvent.kt index b08eb4585b5..a802d37d6ad 100644 --- a/core/analytics/src/main/kotlin/com/wire/android/feature/analytics/model/AnalyticsEvent.kt +++ b/core/analytics/src/main/kotlin/com/wire/android/feature/analytics/model/AnalyticsEvent.kt @@ -31,6 +31,7 @@ import com.wire.android.feature.analytics.model.AnalyticsEventConstants.CONTRIBU import com.wire.android.feature.analytics.model.AnalyticsEventConstants.MESSAGE_ACTION_KEY import com.wire.android.feature.analytics.model.AnalyticsEventConstants.QR_CODE_SEGMENTATION_USER_TYPE_PERSONAL import com.wire.android.feature.analytics.model.AnalyticsEventConstants.QR_CODE_SEGMENTATION_USER_TYPE_TEAM +<<<<<<< HEAD import com.wire.android.feature.analytics.model.AnalyticsEventConstants.MIGRATION_DOT_ACTIVE import com.wire.android.feature.analytics.model.AnalyticsEventConstants.MODAL_BACK_TO_WIRE_CLICKED import com.wire.android.feature.analytics.model.AnalyticsEventConstants.MODAL_CONTINUE_CLICKED @@ -42,6 +43,8 @@ import com.wire.android.feature.analytics.model.AnalyticsEventConstants.PERSONAL import com.wire.android.feature.analytics.model.AnalyticsEventConstants.PERSONAL_TEAM_CREATION_FLOW_STARTED_EVENT import com.wire.android.feature.analytics.model.AnalyticsEventConstants.STEP_MODAL_CREATE_TEAM import com.wire.android.feature.analytics.model.AnalyticsEventConstants.USER_PROFILE_OPENED +======= +>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664)) interface AnalyticsEvent { /** @@ -235,6 +238,7 @@ interface AnalyticsEvent { } } } +<<<<<<< HEAD data class UserProfileOpened(val isMigrationDotActive: Boolean) : AnalyticsEvent { override val key: String = USER_PROFILE_OPENED @@ -322,6 +326,8 @@ interface AnalyticsEvent { } } } +======= +>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664)) } object AnalyticsEventConstants { @@ -382,6 +388,7 @@ object AnalyticsEventConstants { const val QR_CODE_SEGMENTATION_USER_TYPE = "user_type" const val QR_CODE_SEGMENTATION_USER_TYPE_PERSONAL = "personal" const val QR_CODE_SEGMENTATION_USER_TYPE_TEAM = "team" +<<<<<<< HEAD /** * user profile @@ -404,4 +411,6 @@ object AnalyticsEventConstants { const val MODAL_LEAVE_CLICKED = "modal_leave-clicked" const val MODAL_BACK_TO_WIRE_CLICKED = "modal_back-to-wire-clicked" const val MODAL_OPEN_TEAM_MANAGEMENT_CLICKED = "modal_open-tm-clicked" +======= +>>>>>>> 4e943f0ff (feat: Track qr-code analytics #WPB-11679 🍒 (#3565) (#3664)) }