Backup & Sync: configurable daily backup time (default 1am)#13
Merged
Conversation
The daily auto-backup time was hardcoded to 01:00. Add a user-set time-of-day: - BackupSyncPrefs.backupMinute (minutes since midnight, default BACKUP_MINUTE_OF_DAY = 60 = 01:00, clamped to a valid minute) + setBackupMinute. - delayToNextBackupMs now takes a minuteOfDay param (defaults to 1am); reschedule() reads the pref. - applyTimeChange() cancels + reschedules so a new time re-anchors immediately (KEEP alone would leave the old anchor). - BackupSyncScreen: a "Backup time" row with the reusable TimeChip (TimePicker dialog); picking a time saves it + re-anchors. The auto-backup blurb now says "at the time below". Android-only: iOS has no reliable timed background scheduler (it backs up on next app launch), so a time picker there would be misleading — left as-is. Compiles; BackupSyncTest 14 pass (added a chosen-time test; the 1am default test still holds).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a user-set backup time-of-day on the Backup & Sync screen (TimeChip picker, default 01:00). BackupSyncPrefs.backupMinute + setBackupMinute; delayToNextBackupMs takes a minuteOfDay; applyTimeChange re-anchors on change. Android-only (iOS backs up on next launch). Compiles; BackupSyncTest 14 pass.