mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +03:00
Enhance code format
This commit is contained in:
parent
e368046b84
commit
1f9b9571fd
1 changed files with 6 additions and 5 deletions
|
@ -145,12 +145,13 @@ class DecryptionFailureTracker @Inject constructor(
|
|||
|
||||
private fun MXCryptoError.ErrorType.toAnalyticsErrorName(): DetailedErrorName {
|
||||
val detailed = "$name | mxc_crypto_error_type"
|
||||
return when (this) {
|
||||
val errorName = when (this) {
|
||||
MXCryptoError.ErrorType.UNKNOWN_INBOUND_SESSION_ID,
|
||||
MXCryptoError.ErrorType.KEYS_WITHHELD -> Pair(detailed, Error.Name.OlmKeysNotSentError)
|
||||
MXCryptoError.ErrorType.OLM -> Pair(detailed, Error.Name.OlmUnspecifiedError)
|
||||
MXCryptoError.ErrorType.UNKNOWN_MESSAGE_INDEX -> Pair(detailed, Error.Name.OlmIndexError)
|
||||
else -> Pair(detailed, Error.Name.UnknownError)
|
||||
MXCryptoError.ErrorType.KEYS_WITHHELD -> Error.Name.OlmKeysNotSentError
|
||||
MXCryptoError.ErrorType.OLM -> Error.Name.OlmUnspecifiedError
|
||||
MXCryptoError.ErrorType.UNKNOWN_MESSAGE_INDEX -> Error.Name.OlmIndexError
|
||||
else -> Error.Name.UnknownError
|
||||
}
|
||||
return DetailedErrorName(detailed, errorName)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue