mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Merge pull request #1832 from vector-im/renovate/org.matrix.rustcomponents-sdk-android-0.x
Update dependency org.matrix.rustcomponents:sdk-android to v0.1.68
This commit is contained in:
+1
-2
@@ -31,6 +31,5 @@ enum class BackupState {
|
||||
RESUMING,
|
||||
ENABLED,
|
||||
DOWNLOADING,
|
||||
DISABLING,
|
||||
DISABLED;
|
||||
DISABLING;
|
||||
}
|
||||
|
||||
+2
@@ -40,6 +40,8 @@ interface EncryptionService {
|
||||
|
||||
suspend fun disableRecovery(): Result<Unit>
|
||||
|
||||
suspend fun doesBackupExistOnServer(): Result<Boolean>
|
||||
|
||||
/**
|
||||
* Note: accept bot recoveryKey and passphrase.
|
||||
*/
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ class BackupStateMapper {
|
||||
RustBackupState.ENABLED -> BackupState.ENABLED
|
||||
RustBackupState.DOWNLOADING -> BackupState.DOWNLOADING
|
||||
RustBackupState.DISABLING -> BackupState.DISABLING
|
||||
RustBackupState.DISABLED -> BackupState.DISABLED
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
@@ -130,6 +130,12 @@ internal class RustEncryptionService(
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun doesBackupExistOnServer(): Result<Boolean> = withContext(dispatchers.io) {
|
||||
runCatching {
|
||||
service.backupExistsOnServer()
|
||||
}
|
||||
}
|
||||
|
||||
override fun waitForBackupUploadSteadyState(): Flow<BackupUploadState> {
|
||||
return callbackFlow {
|
||||
runCatching {
|
||||
|
||||
+9
@@ -34,6 +34,7 @@ class FakeEncryptionService : EncryptionService {
|
||||
private var waitForBackupUploadSteadyStateFlow: Flow<BackupUploadState> = flowOf()
|
||||
|
||||
private var fixRecoveryIssuesFailure: Exception? = null
|
||||
private var doesBackupExistOnServerResult: Result<Boolean> = Result.success(true)
|
||||
|
||||
override suspend fun enableBackups(): Result<Unit> = simulateLongTask {
|
||||
return Result.success(Unit)
|
||||
@@ -52,6 +53,14 @@ class FakeEncryptionService : EncryptionService {
|
||||
return Result.success(Unit)
|
||||
}
|
||||
|
||||
fun givenDoesBackupExistOnServerResult(result: Result<Boolean>) {
|
||||
doesBackupExistOnServerResult = result
|
||||
}
|
||||
|
||||
override suspend fun doesBackupExistOnServer(): Result<Boolean> = simulateLongTask {
|
||||
return doesBackupExistOnServerResult
|
||||
}
|
||||
|
||||
override suspend fun fixRecoveryIssues(recoveryKey: String): Result<Unit> = simulateLongTask {
|
||||
fixRecoveryIssuesFailure?.let { return Result.failure(it) }
|
||||
return Result.success(Unit)
|
||||
|
||||
Reference in New Issue
Block a user