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.
|
* 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.
|
* The device that signed the backup version.
|
||||||
*/
|
* Can be null if the device is not known.
|
||||||
var deviceId: String? = null
|
*/
|
||||||
|
val device: CryptoDeviceInfo?,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The device that signed the backup version.
|
* Flag to indicate the signature from this device is valid.
|
||||||
* Can be null if the device is not known.
|
*/
|
||||||
*/
|
val valid: Boolean,
|
||||||
var device: CryptoDeviceInfo? = null
|
)
|
||||||
|
|
||||||
/**
|
|
||||||
* Flag to indicate the signature from this device is valid.
|
|
||||||
*/
|
|
||||||
var valid = false
|
|
||||||
}
|
|
||||||
|
|
|
@ -455,10 +455,11 @@ internal class DefaultKeysBackupService @Inject constructor(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val signature = KeysBackupVersionTrustSignature()
|
val signature = KeysBackupVersionTrustSignature(
|
||||||
signature.device = device
|
deviceId = deviceId,
|
||||||
signature.valid = isSignatureValid
|
device = device,
|
||||||
signature.deviceId = deviceId
|
valid = isSignatureValid,
|
||||||
|
)
|
||||||
keysBackupVersionTrustSignatures.add(signature)
|
keysBackupVersionTrustSignatures.add(signature)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue