Prevent creating backups with no valid options selected
(cherry picked from commit 6f34c5e894beb2ac172d00c3d08a43e6388486b3)
This commit is contained in:
parent
75f6b0eb40
commit
e90f656bb6
@ -69,6 +69,7 @@ class CreateBackupScreen : Screen() {
|
|||||||
LazyColumnWithAction(
|
LazyColumnWithAction(
|
||||||
contentPadding = contentPadding,
|
contentPadding = contentPadding,
|
||||||
actionLabel = stringResource(MR.strings.action_create),
|
actionLabel = stringResource(MR.strings.action_create),
|
||||||
|
actionEnabled = state.options.anyEnabled(),
|
||||||
onClickAction = {
|
onClickAction = {
|
||||||
if (!BackupCreateJob.isManualJobRunning(context)) {
|
if (!BackupCreateJob.isManualJobRunning(context)) {
|
||||||
try {
|
try {
|
||||||
|
@ -35,6 +35,8 @@ data class BackupOptions(
|
|||||||
// SY <--
|
// SY <--
|
||||||
)
|
)
|
||||||
|
|
||||||
|
fun anyEnabled() = libraryEntries || appSettings || sourceSettings
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val libraryOptions = persistentListOf(
|
val libraryOptions = persistentListOf(
|
||||||
Entry(
|
Entry(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user