From f05ed4c6ccc0cf7ad8648e60006fb69261c08165 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Thu, 25 Nov 2021 22:40:59 +0100 Subject: [PATCH] Cleanup --- .../analytics/accountdata/AnalyticsAccountDataViewModel.kt | 2 +- .../app/features/analytics/impl/DefaultVectorAnalytics.kt | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/analytics/accountdata/AnalyticsAccountDataViewModel.kt b/vector/src/main/java/im/vector/app/features/analytics/accountdata/AnalyticsAccountDataViewModel.kt index 89b12cd8c2..5d65d7ea42 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/accountdata/AnalyticsAccountDataViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/accountdata/AnalyticsAccountDataViewModel.kt @@ -60,7 +60,7 @@ class AnalyticsAccountDataViewModel @AssistedInject constructor( } companion object : MavericksViewModelFactory by hiltMavericksViewModelFactory() { - private const val ANALYTICS_EVENT_TYPE = "im.vector.analytics"; + private const val ANALYTICS_EVENT_TYPE = "im.vector.analytics" } init { diff --git a/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt b/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt index 4265f5d747..b9d85ec30a 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt @@ -127,19 +127,14 @@ class DefaultVectorAnalytics @Inject constructor( posthog = PostHog.Builder(context, config.postHogApiKey, config.postHogHost) // Record certain application events automatically! (off/false by default) // .captureApplicationLifecycleEvents() - // Record screen views automatically! (off/false by default) // .recordScreenViews() - // Capture deep links as part of the screen call. (off by default) // .captureDeepLinks() - // Maximum number of events to keep in queue before flushing (default 20) // .flushQueueSize(20) - // Max delay before flushing the queue (30 seconds) // .flushInterval(30, TimeUnit.SECONDS) - // Enable or disable collection of ANDROID_ID (true) .collectDeviceId(false) .logLevel(getLogLevel()) @@ -175,7 +170,7 @@ class DefaultVectorAnalytics @Inject constructor( if (this == null) return null return Properties().apply { - this@toPostHogProperties.forEach { putValue(it.key, it.value) } + putAll(this@toPostHogProperties) } } }