mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 05:31:21 +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.
|
* The id of the device that signed the backup version.
|
||||||
*/
|
*/
|
||||||
var deviceId: String? = null
|
val deviceId: String?,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The device that signed the backup version.
|
* The device that signed the backup version.
|
||||||
* Can be null if the device is not known.
|
* Can be null if the device is not known.
|
||||||
*/
|
*/
|
||||||
var device: CryptoDeviceInfo? = null
|
val device: CryptoDeviceInfo?,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to indicate the signature from this device is valid.
|
* Flag to indicate the signature from this device is valid.
|
||||||
*/
|
*/
|
||||||
var valid = false
|
val valid: Boolean,
|
||||||
}
|
)
|
||||||
|
|
|
@ -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