Add worker method for determining where to take a user when they press signal backups.

This commit is contained in:
Alex Hart
2024-07-26 15:01:01 -03:00
committed by Nicholas Tinsley
parent 36846301de
commit 1a7611d505
4 changed files with 37 additions and 7 deletions

View File

@@ -105,6 +105,20 @@ object BackupRepository {
}
}
@WorkerThread
fun canAccessRemoteBackupSettings(): Boolean {
// TODO [message-backups]
// We need to check whether the user can access remote backup settings.
// 1. Do they have a receipt they need to be able to view?
// 2. Do they have a backup they need to be able to manage?
// The easy thing to do here would actually be to set a ui hint.
return SignalStore.backup.areBackupsEnabled
}
@WorkerThread
fun turnOffAndDeleteBackup() {
RecurringInAppPaymentRepository.cancelActiveSubscriptionSync(InAppPaymentSubscriberRecord.Type.BACKUP)