Prevent verification while initial sync is in progress (#1138)

* Prevent verification while initial sync is in progress

* Add `canVerifySessionFlow` to simplify the check
This commit is contained in:
Jorge Martin Espinosa 2023-08-24 13:43:36 +02:00 committed by GitHub
parent f5fd505bc2
commit 39ef780fe7
8 changed files with 38 additions and 26 deletions

View file

@ -16,6 +16,7 @@
package io.element.android.libraries.matrix.api.verification
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.StateFlow
interface SessionVerificationService {
@ -37,6 +38,11 @@ interface SessionVerificationService {
*/
val sessionVerifiedStatus: StateFlow<SessionVerifiedStatus>
/**
* Returns whether the current session needs to be verified and the SDK is ready to start the verification.
*/
val canVerifySessionFlow: Flow<Boolean>
/**
* Request verification of the current session.
*/