From dac08ba3dac60718a63af989de3c94394cbdde41 Mon Sep 17 00:00:00 2001 From: KaiserBh Date: Tue, 14 Nov 2023 17:48:10 +1100 Subject: [PATCH] refactor: Move SyncData to SyncService.kt Since it only contains a single class doesn't need to be in it's own package. Signed-off-by: KaiserBh --- .../java/eu/kanade/tachiyomi/data/sync/models/Sync.kt | 9 --------- .../eu/kanade/tachiyomi/data/sync/service/SyncService.kt | 7 ++++++- 2 files changed, 6 insertions(+), 10 deletions(-) delete mode 100644 app/src/main/java/eu/kanade/tachiyomi/data/sync/models/Sync.kt diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/sync/models/Sync.kt b/app/src/main/java/eu/kanade/tachiyomi/data/sync/models/Sync.kt deleted file mode 100644 index 13640eebb..000000000 --- a/app/src/main/java/eu/kanade/tachiyomi/data/sync/models/Sync.kt +++ /dev/null @@ -1,9 +0,0 @@ -package eu.kanade.tachiyomi.data.sync.models - -import eu.kanade.tachiyomi.data.backup.models.Backup -import kotlinx.serialization.Serializable - -@Serializable -data class SyncData( - val backup: Backup? = null, -) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/SyncService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/SyncService.kt index bfa6b51c5..6e63fcd8f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/SyncService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/sync/service/SyncService.kt @@ -5,11 +5,16 @@ import eu.kanade.tachiyomi.data.backup.models.Backup import eu.kanade.tachiyomi.data.backup.models.BackupCategory import eu.kanade.tachiyomi.data.backup.models.BackupChapter import eu.kanade.tachiyomi.data.backup.models.BackupManga -import eu.kanade.tachiyomi.data.sync.models.SyncData +import kotlinx.serialization.Serializable import kotlinx.serialization.json.Json import tachiyomi.domain.sync.SyncPreferences import java.time.Instant +@Serializable +data class SyncData( + val backup: Backup? = null, +) + abstract class SyncService( val context: Context, val json: Json,