diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupManager.kt index f12047891..586306023 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupManager.kt @@ -55,7 +55,7 @@ class FullBackupManager(context: Context) : AbstractBackupManager(context) { backup = Backup( backupManga(databaseManga, flags), - backupCategories(), + backupCategories(flags), emptyList(), backupExtensionInfo(databaseManga), ) @@ -133,10 +133,15 @@ class FullBackupManager(context: Context) : AbstractBackupManager(context) { * * @return list of [BackupCategory] to be backed up */ - private fun backupCategories(): List { - return databaseHelper.getCategories() - .executeAsBlocking() - .map { BackupCategory.copyFrom(it) } + private fun backupCategories(options: Int): List { + // Check if user wants category information in backup + return if (options and BACKUP_CATEGORY_MASK == BACKUP_CATEGORY) { + databaseHelper.getCategories() + .executeAsBlocking() + .map { BackupCategory.copyFrom(it) } + } else { + emptyList() + } } /**