From 7cee8288d5292d460d8b10da18e6ffd5a09db64e Mon Sep 17 00:00:00 2001 From: KaiserBh Date: Wed, 20 Dec 2023 05:06:13 +1100 Subject: [PATCH] refactor: fixed imports. Fixed the imports and removed backupNotify and backupRestorer since it's separated now. --- .../eu/kanade/tachiyomi/data/sync/SyncManager.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 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 5cafbeb9f..b1801297f 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,15 +2,14 @@ package eu.kanade.tachiyomi.data.sync import android.content.Context import android.net.Uri -import eu.kanade.tachiyomi.data.backup.BackupCreateFlags -import eu.kanade.tachiyomi.data.backup.BackupCreator -import eu.kanade.tachiyomi.data.backup.BackupNotifier -import eu.kanade.tachiyomi.data.backup.BackupRestoreJob -import eu.kanade.tachiyomi.data.backup.BackupRestorer +import eu.kanade.tachiyomi.data.backup.create.BackupCreateFlags +import eu.kanade.tachiyomi.data.backup.create.BackupCreator import eu.kanade.tachiyomi.data.backup.models.Backup import eu.kanade.tachiyomi.data.backup.models.BackupChapter import eu.kanade.tachiyomi.data.backup.models.BackupManga import eu.kanade.tachiyomi.data.backup.models.BackupSerializer +import eu.kanade.tachiyomi.data.backup.restore.BackupRestoreJob +import eu.kanade.tachiyomi.data.backup.restore.MangaRestorer import eu.kanade.tachiyomi.data.sync.service.GoogleDriveSyncService import eu.kanade.tachiyomi.data.sync.service.SyncData import eu.kanade.tachiyomi.data.sync.service.SyncYomiSyncService @@ -51,8 +50,7 @@ class SyncManager( ) { private val backupCreator: BackupCreator = BackupCreator(context) private val notifier: SyncNotifier = SyncNotifier(context) - private val backupNotify: BackupNotifier = BackupNotifier(context) - private val backupRestorer: BackupRestorer = BackupRestorer(context, backupNotify) + private val mangaRestorer: MangaRestorer = MangaRestorer() enum class SyncService(val value: Int) { NONE(0), @@ -253,7 +251,7 @@ class SyncManager( localMangaMap[nonFavorite.url]?.let { localManga -> if (localManga.favorite != nonFavorite.favorite) { val updatedManga = localManga.copy(favorite = nonFavorite.favorite) - backupRestorer.updateManga(updatedManga) + mangaRestorer.updateManga(updatedManga) } } }