From 6466bf040a1349de30678bfb44dee3b02104c561 Mon Sep 17 00:00:00 2001 From: KaiserBh Date: Sat, 30 Dec 2023 21:39:15 +1100 Subject: [PATCH] chore: ktlint Signed-off-by: KaiserBh --- .../kanade/tachiyomi/data/sync/SyncManager.kt | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/sync/SyncManager.kt b/app/src/main/java/eu/kanade/tachiyomi/data/sync/SyncManager.kt index 46ce46592..a5c9be8be 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/sync/SyncManager.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/sync/SyncManager.kt @@ -2,8 +2,8 @@ package eu.kanade.tachiyomi.data.sync import android.content.Context import android.net.Uri -import eu.kanade.tachiyomi.data.backup.create.BackupCreateFlags import eu.kanade.tachiyomi.data.backup.create.BackupCreator +import eu.kanade.tachiyomi.data.backup.create.BackupOptions import eu.kanade.tachiyomi.data.backup.models.Backup import eu.kanade.tachiyomi.data.backup.models.BackupChapter import eu.kanade.tachiyomi.data.backup.models.BackupManga @@ -72,12 +72,22 @@ class SyncManager( */ suspend fun syncData() { val databaseManga = getAllMangaFromDB() + val backupOptions = BackupOptions( + libraryEntries = true, + categories = true, + chapters = true, + tracking = true, + history = true, + appSettings = true, + sourceSettings = true, + privateSettings = true, + ) val backup = Backup( - backupManga = backupCreator.backupMangas(databaseManga, BackupCreateFlags.AutomaticDefaults), - backupCategories = backupCreator.backupCategories(BackupCreateFlags.AutomaticDefaults), + backupManga = backupCreator.backupMangas(databaseManga, backupOptions), + backupCategories = backupCreator.backupCategories(backupOptions), backupSources = backupCreator.backupSources(databaseManga), - backupPreferences = backupCreator.backupAppPreferences(BackupCreateFlags.AutomaticDefaults), - backupSourcePreferences = backupCreator.backupSourcePreferences(BackupCreateFlags.AutomaticDefaults), + backupPreferences = backupCreator.backupAppPreferences(backupOptions), + backupSourcePreferences = backupCreator.backupSourcePreferences(backupOptions), ) // Create the SyncData object