mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-29 09:51:52 +01:00
Prevent creating backups with no valid options selected
This commit is contained in:
parent
74931fad86
commit
6f34c5e894
app/src/main/java/eu/kanade
presentation/more/settings/screen/data
tachiyomi/data/backup/create
@ -68,6 +68,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 {
|
||||||
|
@ -26,6 +26,8 @@ data class BackupOptions(
|
|||||||
privateSettings,
|
privateSettings,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
fun anyEnabled() = libraryEntries || appSettings || sourceSettings
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val libraryOptions = persistentListOf(
|
val libraryOptions = persistentListOf(
|
||||||
Entry(
|
Entry(
|
||||||
|
Loading…
Reference in New Issue
Block a user