Implement checkin job for backups.

This commit is contained in:
Alex Hart
2024-11-18 15:00:17 -04:00
committed by Greyson Parrelli
parent ae37001949
commit 6ff31b950d
8 changed files with 146 additions and 0 deletions

View File

@@ -132,6 +132,19 @@ object BackupRepository {
}
}
/**
* Refreshes backup via server
*/
fun refreshBackup(): NetworkResult<Unit> {
return initBackupAndFetchAuth()
.then { accessPair ->
AppDependencies.archiveApi.refreshBackup(
aci = SignalStore.account.requireAci(),
archiveServiceAccess = accessPair.messageBackupAccess
)
}
}
/**
* Gets the free storage space in the device's data partition.
*/