Fix moar ktlint issues

This commit is contained in:
Benoit Marty 2024-01-11 09:41:14 +01:00 committed by Benoit Marty
parent a831f05f6e
commit 5d086ad82d
528 changed files with 146 additions and 629 deletions

View file

@ -38,13 +38,13 @@ class SentryAnalyticsProvider @Inject constructor(
@ApplicationContext private val context: Context,
private val buildMeta: BuildMeta,
) : AnalyticsProvider {
override val name = SentryConfig.name
override val name = SentryConfig.NAME
override fun init() {
Timber.tag(analyticsTag.value).d("Initializing Sentry")
if (Sentry.isEnabled()) return
SentryAndroid.init(context) { options ->
options.dsn = SentryConfig.dns
options.dsn = SentryConfig.DNS
options.beforeSend = SentryOptions.BeforeSendCallback { event, _ -> event }
options.tracesSampleRate = 1.0
options.isEnableUserInteractionTracing = true
@ -73,7 +73,7 @@ class SentryAnalyticsProvider @Inject constructor(
}
private fun BuildType.toSentryEnv() = when (this) {
BuildType.RELEASE -> SentryConfig.envRelease
BuildType.RELEASE -> SentryConfig.ENV_RELEASE
BuildType.NIGHTLY,
BuildType.DEBUG -> SentryConfig.envDebug
BuildType.DEBUG -> SentryConfig.ENV_DEBUG
}

View file

@ -17,8 +17,8 @@
package io.element.android.services.analyticsproviders.sentry
object SentryConfig {
const val name = "Sentry"
const val dns = "https://32f7ff6a6e724f90838b7654042b2e81@sentry.tools.element.io/59"
const val envDebug = "DEBUG"
const val envRelease = "RELEASE"
const val NAME = "Sentry"
const val DNS = "https://32f7ff6a6e724f90838b7654042b2e81@sentry.tools.element.io/59"
const val ENV_DEBUG = "DEBUG"
const val ENV_RELEASE = "RELEASE"
}