mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 20:06:51 +03:00
Immutable data class. var -> val
This commit is contained in:
parent
10b47c33d1
commit
3435357b1c
2 changed files with 20 additions and 21 deletions
|
@ -20,23 +20,21 @@ import org.matrix.android.sdk.api.session.crypto.model.CryptoDeviceInfo
|
|||
|
||||
/**
|
||||
* A signature in a `KeysBackupVersionTrust` object.
|
||||
* TODO Make it a data class with only val
|
||||
*/
|
||||
class KeysBackupVersionTrustSignature {
|
||||
data class KeysBackupVersionTrustSignature(
|
||||
/**
|
||||
* The id of the device that signed the backup version.
|
||||
*/
|
||||
val deviceId: String?,
|
||||
|
||||
/**
|
||||
* The id of the device that signed the backup version.
|
||||
*/
|
||||
var deviceId: String? = null
|
||||
/**
|
||||
* The device that signed the backup version.
|
||||
* Can be null if the device is not known.
|
||||
*/
|
||||
val device: CryptoDeviceInfo?,
|
||||
|
||||
/**
|
||||
* The device that signed the backup version.
|
||||
* Can be null if the device is not known.
|
||||
*/
|
||||
var device: CryptoDeviceInfo? = null
|
||||
|
||||
/**
|
||||
* Flag to indicate the signature from this device is valid.
|
||||
*/
|
||||
var valid = false
|
||||
}
|
||||
/**
|
||||
* Flag to indicate the signature from this device is valid.
|
||||
*/
|
||||
val valid: Boolean,
|
||||
)
|
||||
|
|
|
@ -455,10 +455,11 @@ internal class DefaultKeysBackupService @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
val signature = KeysBackupVersionTrustSignature()
|
||||
signature.device = device
|
||||
signature.valid = isSignatureValid
|
||||
signature.deviceId = deviceId
|
||||
val signature = KeysBackupVersionTrustSignature(
|
||||
deviceId = deviceId,
|
||||
device = device,
|
||||
valid = isSignatureValid,
|
||||
)
|
||||
keysBackupVersionTrustSignatures.add(signature)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue