From 67706534f20d1810bfc852f1421f62f369b42bc5 Mon Sep 17 00:00:00 2001 From: "omer.habib" Date: Fri, 13 Sep 2024 10:14:43 +0500 Subject: [PATCH] fix: Address PR comments --- .../main/java/org/openedx/app/analytics/FirebaseAnalytics.kt | 2 +- app/src/main/java/org/openedx/app/analytics/SegmentAnalytics.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/openedx/app/analytics/FirebaseAnalytics.kt b/app/src/main/java/org/openedx/app/analytics/FirebaseAnalytics.kt index d1eb8cb18..5f2981c39 100644 --- a/app/src/main/java/org/openedx/app/analytics/FirebaseAnalytics.kt +++ b/app/src/main/java/org/openedx/app/analytics/FirebaseAnalytics.kt @@ -7,7 +7,7 @@ import org.openedx.core.utils.Logger class FirebaseAnalytics(context: Context) : Analytics { private val logger = Logger(TAG) - private var tracker: FirebaseAnalytics = FirebaseAnalytics.getInstance(context) + private val tracker: FirebaseAnalytics = FirebaseAnalytics.getInstance(context) override fun logScreenEvent(screenName: String, params: Map) { tracker.logEvent( diff --git a/app/src/main/java/org/openedx/app/analytics/SegmentAnalytics.kt b/app/src/main/java/org/openedx/app/analytics/SegmentAnalytics.kt index 37a34bc55..ef28e0c4b 100644 --- a/app/src/main/java/org/openedx/app/analytics/SegmentAnalytics.kt +++ b/app/src/main/java/org/openedx/app/analytics/SegmentAnalytics.kt @@ -19,7 +19,7 @@ class SegmentAnalytics(context: Context, config: Config) : Analytics { private val logger = Logger(TAG) // Create an analytics client with the given application context and Segment write key. - private var tracker: SegmentTracker = + private val tracker: SegmentTracker = SegmentAnalyticsBuilder(config.getSegmentConfig().segmentWriteKey, context) { // Automatically track Lifecycle events trackApplicationLifecycleEvents = true