Backup & Restore for custom attributes

This commit is contained in:
MM20
2022-07-27 21:08:07 +02:00
parent 2e3add0d94
commit f069d5f6f4
10 changed files with 102 additions and 6 deletions
@@ -173,6 +173,7 @@ fun RestoreBackupSheet(
BackupComponent.Settings -> Icons.Rounded.Settings
BackupComponent.Websearches -> Icons.Rounded.TravelExplore
BackupComponent.Widgets -> Icons.Rounded.Widgets
BackupComponent.Customizations -> Icons.Rounded.Edit
},
contentDescription = null
)
@@ -183,6 +184,7 @@ fun RestoreBackupSheet(
BackupComponent.Settings -> R.string.backup_component_settings
BackupComponent.Websearches -> R.string.backup_component_websearches
BackupComponent.Widgets -> R.string.backup_component_widgets
BackupComponent.Customizations -> R.string.backup_component_customizations
}
),
style = MaterialTheme.typography.titleMedium,
@@ -126,6 +126,14 @@ fun CreateBackupSheet(
viewModel.toggleComponent(BackupComponent.Widgets)
}
)
BackupableComponent(
title = stringResource(R.string.backup_component_customizations),
icon = Icons.Rounded.Edit,
checked = components.contains(BackupComponent.Customizations),
onCheckedChange = {
viewModel.toggleComponent(BackupComponent.Customizations)
}
)
BackupableComponent(
title = stringResource(R.string.backup_component_websearches),
icon = Icons.Rounded.TravelExplore,