Skip to content

Commit 1f9b957

Browse files
Enhance code format
1 parent e368046 commit 1f9b957

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

vector/src/main/java/im/vector/app/features/analytics/DecryptionFailureTracker.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,13 @@ class DecryptionFailureTracker @Inject constructor(
145145

146146
private fun MXCryptoError.ErrorType.toAnalyticsErrorName(): DetailedErrorName {
147147
val detailed = "$name | mxc_crypto_error_type"
148-
return when (this) {
148+
val errorName = when (this) {
149149
MXCryptoError.ErrorType.UNKNOWN_INBOUND_SESSION_ID,
150-
MXCryptoError.ErrorType.KEYS_WITHHELD -> Pair(detailed, Error.Name.OlmKeysNotSentError)
151-
MXCryptoError.ErrorType.OLM -> Pair(detailed, Error.Name.OlmUnspecifiedError)
152-
MXCryptoError.ErrorType.UNKNOWN_MESSAGE_INDEX -> Pair(detailed, Error.Name.OlmIndexError)
153-
else -> Pair(detailed, Error.Name.UnknownError)
150+
MXCryptoError.ErrorType.KEYS_WITHHELD -> Error.Name.OlmKeysNotSentError
151+
MXCryptoError.ErrorType.OLM -> Error.Name.OlmUnspecifiedError
152+
MXCryptoError.ErrorType.UNKNOWN_MESSAGE_INDEX -> Error.Name.OlmIndexError
153+
else -> Error.Name.UnknownError
154154
}
155+
return DetailedErrorName(detailed, errorName)
155156
}
156157
}

0 commit comments

Comments
 (0)