mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Use VerificationState.VERIFIED as soon as it's available (#5973)
This can't be a false positive like `VerificationState.UNKNOWN` or `VerificationState.UNVERIFIED`, so it makes sense to return it as fast as possible instead of waiting for the whole encryption layer to be fully loaded.
This commit is contained in:
committed by
GitHub
parent
7186044482
commit
8955fb18ae
+2
-1
@@ -72,7 +72,8 @@ class RustSessionVerificationService(
|
|||||||
// Listen for changes in verification status and update accordingly
|
// Listen for changes in verification status and update accordingly
|
||||||
private val verificationStateListenerTaskHandle = encryptionService.verificationStateListener(object : VerificationStateListener {
|
private val verificationStateListenerTaskHandle = encryptionService.verificationStateListener(object : VerificationStateListener {
|
||||||
override fun onUpdate(status: VerificationState) {
|
override fun onUpdate(status: VerificationState) {
|
||||||
if (!isInitialized.get()) {
|
// If the status is verified, just use it. It can't be a false positive like unknown or unverified
|
||||||
|
if (!isInitialized.get() && status != VerificationState.VERIFIED) {
|
||||||
Timber.d("Discarding new verifications state: $status. E2EE is not initialised yet")
|
Timber.d("Discarding new verifications state: $status. E2EE is not initialised yet")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user