Add UI for when the user's grace period expires or while they are in the grace period.

This commit is contained in:
Alex Hart
2025-05-15 13:35:32 -03:00
committed by Cody Henthorne
parent 5e9824a180
commit a6bfeebb24
9 changed files with 158 additions and 16 deletions

View File

@@ -70,6 +70,7 @@ class BackupValues(store: KeyValueStore) : SignalStoreValues(store) {
private const val KEY_INVALID_BACKUP_VERSION = "backup.invalid.version"
private const val KEY_USER_MANUALLY_SKIPPED_MEDIA_RESTORE = "backup.user.manually.skipped.media.restore"
private const val KEY_BACKUP_EXPIRED_AND_DOWNGRADED = "backup.expired.and.downgraded"
private const val KEY_MEDIA_ROOT_BACKUP_KEY = "backup.mediaRootBackupKey"
@@ -111,6 +112,8 @@ class BackupValues(store: KeyValueStore) : SignalStoreValues(store) {
var userManuallySkippedMediaRestore: Boolean by booleanValue(KEY_USER_MANUALLY_SKIPPED_MEDIA_RESTORE, false)
var backupExpiredAndDowngraded: Boolean by booleanValue(KEY_BACKUP_EXPIRED_AND_DOWNGRADED, false)
/**
* The last time the device notified the server that the archive is still in use.
*/
@@ -242,6 +245,11 @@ class BackupValues(store: KeyValueStore) : SignalStoreValues(store) {
*/
var spaceAvailableOnDiskBytes: Long by longValue(KEY_BACKUP_FAIL_SPACE_REMAINING, -1L)
fun internalSetBackupFailedErrorState() {
markMessageBackupFailure()
putLong(KEY_BACKUP_FAIL_SHEET_SNOOZE_TIME, 0)
}
/**
* Call when the user disables backups. Clears/resets all relevant fields.
*/