Prevent creating backups with no valid options selected
This commit is contained in:
parent
74931fad86
commit
6f34c5e894
2 changed files with 3 additions and 0 deletions
|
@ -68,6 +68,7 @@ class CreateBackupScreen : Screen() {
|
|||
LazyColumnWithAction(
|
||||
contentPadding = contentPadding,
|
||||
actionLabel = stringResource(MR.strings.action_create),
|
||||
actionEnabled = state.options.anyEnabled(),
|
||||
onClickAction = {
|
||||
if (!BackupCreateJob.isManualJobRunning(context)) {
|
||||
try {
|
||||
|
|
|
@ -26,6 +26,8 @@ data class BackupOptions(
|
|||
privateSettings,
|
||||
)
|
||||
|
||||
fun anyEnabled() = libraryEntries || appSettings || sourceSettings
|
||||
|
||||
companion object {
|
||||
val libraryOptions = persistentListOf(
|
||||
Entry(
|
||||
|
|
Reference in a new issue