From c0aa0cef62dff08865b29e44d833c06550ffc262 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 19 Jan 2022 15:24:25 +0100 Subject: [PATCH] Analytics: inject analyticsTracker, it has a better scope --- .../vector/app/features/analytics/DecryptionFailureTracker.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt b/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt index 8b9dcc348b..6b2ceb1444 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt @@ -49,7 +49,7 @@ private const val CHECK_INTERVAL = 2_000L */ @Singleton class DecryptionFailureTracker @Inject constructor( - private val vectorAnalytics: VectorAnalytics, + private val analyticsTracker: AnalyticsTracker, private val clock: Clock ) { @@ -136,7 +136,7 @@ class DecryptionFailureTracker @Inject constructor( // for now we ignore events already reported even if displayed again? .filter { alreadyReported.contains(it).not() } .forEach { failedEventId -> - vectorAnalytics.capture(Error(failedEventId, Error.Domain.E2EE, aggregation.key)) + analyticsTracker.capture(Error(failedEventId, Error.Domain.E2EE, aggregation.key)) alreadyReported.add(failedEventId) } }