mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
chore: Make categories backup independent
This commit is contained in:
parent
8c409ff306
commit
d0a99ca8d9
2 changed files with 6 additions and 7 deletions
|
@ -49,12 +49,6 @@ data class BackupOptions(
|
|||
getter = BackupOptions::libraryEntries,
|
||||
setter = { options, enabled -> options.copy(libraryEntries = enabled) },
|
||||
),
|
||||
Entry(
|
||||
label = MR.strings.categories,
|
||||
getter = BackupOptions::categories,
|
||||
setter = { options, enabled -> options.copy(categories = enabled) },
|
||||
enabled = { it.libraryEntries },
|
||||
),
|
||||
Entry(
|
||||
label = MR.strings.chapters,
|
||||
getter = BackupOptions::chapters,
|
||||
|
@ -85,6 +79,11 @@ data class BackupOptions(
|
|||
setter = { options, enabled -> options.copy(readManga = enabled) },
|
||||
enabled = { it.libraryEntries },
|
||||
),
|
||||
Entry(
|
||||
label = MR.strings.categories,
|
||||
getter = BackupOptions::categories,
|
||||
setter = { options, enabled -> options.copy(categories = enabled) },
|
||||
),
|
||||
Entry(
|
||||
label = MR.strings.app_settings,
|
||||
getter = BackupOptions::appPrefs,
|
||||
|
|
|
@ -15,7 +15,7 @@ class CategoriesBackupCreator(
|
|||
* @return list of [BackupCategory] to be backed up
|
||||
*/
|
||||
operator fun invoke(options: BackupOptions): List<BackupCategory> {
|
||||
if (!options.libraryEntries) return emptyList()
|
||||
if (!options.categories) return emptyList()
|
||||
|
||||
return db.getCategories()
|
||||
.executeAsBlocking()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue