Remove max automatic backups setting

We just always create up to 4 now to simplify it, given the addition of syncing
is going to make this section pretty busy.
This commit is contained in:
arkon
2023-11-19 15:17:19 -05:00
parent 8857b7e0c1
commit e3b70ca08d
5 changed files with 4 additions and 19 deletions

View File

@@ -76,8 +76,6 @@ object SettingsDataScreen : SearchableSettings {
@Composable
private fun getBackupAndRestoreGroup(backupPreferences: BackupPreferences): Preference.PreferenceGroup {
val context = LocalContext.current
val backupIntervalPref = backupPreferences.backupInterval()
val backupInterval by backupIntervalPref.collectAsState()
val lastAutoBackup by backupPreferences.lastAutoBackupTimestamp().collectAsState()
return Preference.PreferenceGroup(
@@ -89,7 +87,7 @@ object SettingsDataScreen : SearchableSettings {
// Automatic backups
Preference.PreferenceItem.ListPreference(
pref = backupIntervalPref,
pref = backupPreferences.backupInterval(),
title = stringResource(MR.strings.pref_backup_interval),
entries = mapOf(
0 to stringResource(MR.strings.off),
@@ -104,12 +102,6 @@ object SettingsDataScreen : SearchableSettings {
true
},
),
Preference.PreferenceItem.ListPreference(
pref = backupPreferences.numberOfBackups(),
enabled = backupInterval != 0,
title = stringResource(MR.strings.pref_backup_slots),
entries = listOf(2, 3, 4, 5).associateWith { it.toString() },
),
Preference.PreferenceItem.InfoPreference(
stringResource(MR.strings.backup_info) + "\n\n" +
stringResource(MR.strings.last_auto_backup_info, relativeTimeSpanString(lastAutoBackup)),