Make sure we know the session verification state before showing the option to verify the session. #5521
This commit is contained in:
+3
-2
@@ -7,6 +7,7 @@
|
||||
|
||||
package io.element.android.libraries.matrix.test.encryption
|
||||
|
||||
import io.element.android.libraries.architecture.AsyncData
|
||||
import io.element.android.libraries.matrix.api.core.UserId
|
||||
import io.element.android.libraries.matrix.api.encryption.BackupState
|
||||
import io.element.android.libraries.matrix.api.encryption.BackupUploadState
|
||||
@@ -34,7 +35,7 @@ class FakeEncryptionService(
|
||||
override val recoveryStateStateFlow: MutableStateFlow<RecoveryState> = MutableStateFlow(RecoveryState.UNKNOWN)
|
||||
override val enableRecoveryProgressStateFlow: MutableStateFlow<EnableRecoveryProgress> = MutableStateFlow(EnableRecoveryProgress.Starting)
|
||||
override val isLastDevice: MutableStateFlow<Boolean> = MutableStateFlow(false)
|
||||
override val hasDevicesToVerifyAgainst: MutableStateFlow<Boolean> = MutableStateFlow(true)
|
||||
override val hasDevicesToVerifyAgainst: MutableStateFlow<AsyncData<Boolean>> = MutableStateFlow(AsyncData.Uninitialized)
|
||||
private var waitForBackupUploadSteadyStateFlow: Flow<BackupUploadState> = flowOf()
|
||||
|
||||
private var recoverFailure: Exception? = null
|
||||
@@ -84,7 +85,7 @@ class FakeEncryptionService(
|
||||
this.isLastDevice.value = isLastDevice
|
||||
}
|
||||
|
||||
fun emitHasDevicesToVerifyAgainst(hasDevicesToVerifyAgainst: Boolean) {
|
||||
fun emitHasDevicesToVerifyAgainst(hasDevicesToVerifyAgainst: AsyncData<Boolean>) {
|
||||
this.hasDevicesToVerifyAgainst.value = hasDevicesToVerifyAgainst
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user