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 222c8a979..bfa6b51c5 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 @@ -33,17 +33,6 @@ abstract class SyncService( return finalSyncData.backup } - /** - * Decodes the given sync data string into a Backup object. - * - * @param data The sync data string to be decoded. - * @return The decoded Backup object. - */ - protected fun decodeSyncBackup(data: String): Backup { - val syncData = json.decodeFromString(SyncData.serializer(), data) - return syncData.backup!! - } - /** * For refreshing tokens and other possible operations before connecting to the remote storage */ @@ -81,9 +70,7 @@ abstract class SyncService( // Create the merged SData object return SyncData( - sync = localSyncData.sync, // always use the local sync info backup = mergedBackup, - device = localSyncData.device, // always use the local device info ) } diff --git a/core/src/main/java/tachiyomi/core/preference/PreferenceStore.kt b/core/src/main/java/tachiyomi/core/preference/PreferenceStore.kt index 55ba9597f..5b0e9da9b 100644 --- a/core/src/main/java/tachiyomi/core/preference/PreferenceStore.kt +++ b/core/src/main/java/tachiyomi/core/preference/PreferenceStore.kt @@ -1,7 +1,5 @@ package tachiyomi.core.preference -import java.time.Instant - interface PreferenceStore { fun getString(key: String, defaultValue: String = ""): Preference @@ -16,15 +14,6 @@ interface PreferenceStore { fun getStringSet(key: String, defaultValue: Set = emptySet()): Preference> - fun getInstant(key: String, defaultValue: Instant = Instant.EPOCH): Preference { - return getObject( - key = key, - defaultValue = defaultValue, - serializer = { it.epochSecond.toString() }, - deserializer = { Instant.ofEpochSecond(it.toLong()) }, - ) - } - fun getObject( key: String, defaultValue: T,