BackupState.DISABLED has been removed. Now when the value is UNKNOWN, the app need to invoke EncryptionService.doesBackupExistOnServer() to check if a Backup exists.
This commit is contained in:
parent
fe1ffe3aae
commit
d352f14665
9 changed files with 57 additions and 12 deletions
|
|
@ -29,7 +29,6 @@ class BackupStateMapper {
|
|||
RustBackupState.ENABLED -> BackupState.ENABLED
|
||||
RustBackupState.DOWNLOADING -> BackupState.DOWNLOADING
|
||||
RustBackupState.DISABLING -> BackupState.DISABLING
|
||||
RustBackupState.DISABLED -> BackupState.DISABLED
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue