mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Make sure we display errors when we create a recovery key and it fails (#5079)
* Make sure we display errors when we create a recovery key and it fails * Add another preview for the error state * Update screenshots --------- Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
committed by
GitHub
parent
34848aa7f9
commit
afa01e926b
+3
-2
@@ -26,7 +26,8 @@ class FakeEncryptionService(
|
||||
private val pinUserIdentityResult: (UserId) -> Result<Unit> = { lambdaError() },
|
||||
private val isUserVerifiedResult: (UserId) -> Result<Boolean> = { lambdaError() },
|
||||
private val withdrawVerificationResult: (UserId) -> Result<Unit> = { lambdaError() },
|
||||
private val getUserIdentityResult: (UserId) -> Result<IdentityState?> = { lambdaError() }
|
||||
private val getUserIdentityResult: (UserId) -> Result<IdentityState?> = { lambdaError() },
|
||||
private val enableRecoveryLambda: (Boolean) -> Result<Unit> = { lambdaError() },
|
||||
) : EncryptionService {
|
||||
private var disableRecoveryFailure: Exception? = null
|
||||
override val backupStateStateFlow: MutableStateFlow<BackupState> = MutableStateFlow(BackupState.UNKNOWN)
|
||||
@@ -87,7 +88,7 @@ class FakeEncryptionService(
|
||||
}
|
||||
|
||||
override suspend fun enableRecovery(waitForBackupsToUpload: Boolean): Result<Unit> = simulateLongTask {
|
||||
return Result.success(Unit)
|
||||
return enableRecoveryLambda(waitForBackupsToUpload)
|
||||
}
|
||||
|
||||
fun givenWaitForBackupUploadSteadyStateFlow(flow: Flow<BackupUploadState>) {
|
||||
|
||||
Reference in New Issue
Block a user