From e4e6c6337930714d0bd42df9d3b08fa8c823dcad Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Tue, 17 Sep 2024 07:27:54 -0300 Subject: [PATCH] fix: crash on starting analytics, globalanalytics not readty --- .../feature/analytics/AnonymousAnalyticsManagerImpl.kt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsManagerImpl.kt b/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsManagerImpl.kt index bfa6151b0a3..1a0e72078d8 100644 --- a/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsManagerImpl.kt +++ b/core/analytics-enabled/src/main/kotlin/com/wire/android/feature/analytics/AnonymousAnalyticsManagerImpl.kt @@ -42,10 +42,6 @@ object AnonymousAnalyticsManagerImpl : AnonymousAnalyticsManager { private val mutex = Mutex() private lateinit var coroutineScope: CoroutineScope - init { - globalAnalyticsManager = this - } - override fun init( context: Context, analyticsSettings: AnalyticsSettings, @@ -57,6 +53,7 @@ object AnonymousAnalyticsManagerImpl : AnonymousAnalyticsManager { ) { this.coroutineScope = CoroutineScope(dispatcher) this.anonymousAnalyticsRecorder = anonymousAnalyticsRecorder + globalAnalyticsManager = this coroutineScope.launch { analyticsResultFlow