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 55694b78a..4471adf51 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 @@ -70,7 +70,8 @@ abstract class SyncService( val mergedCategoriesList = mergeCategoriesLists(localSyncData.backup?.backupCategories, remoteSyncData.backup?.backupCategories) - val mergedSourcesList = mergeSourcesLists(localSyncData.backup?.backupSources, remoteSyncData.backup?.backupSources) + val mergedSourcesList = + mergeSourcesLists(localSyncData.backup?.backupSources, remoteSyncData.backup?.backupSources) val mergedPreferencesList = mergePreferencesLists(localSyncData.backup?.backupPreferences, remoteSyncData.backup?.backupPreferences) val mergedSourcePreferencesList = mergeSourcePreferencesLists( @@ -331,7 +332,7 @@ abstract class SyncService( private fun mergeSourcesLists( localSources: List?, - remoteSources: List? + remoteSources: List?, ): List { val logTag = "MergeSources" @@ -376,7 +377,7 @@ abstract class SyncService( private fun mergePreferencesLists( localPreferences: List?, - remotePreferences: List? + remotePreferences: List?, ): List { val logTag = "MergePreferences" @@ -424,7 +425,7 @@ abstract class SyncService( private fun mergeSourcePreferencesLists( localPreferences: List?, - remotePreferences: List? + remotePreferences: List?, ): List { val logTag = "MergeSourcePreferences" @@ -438,7 +439,8 @@ abstract class SyncService( } // Merge both source preferences maps - val mergedSourcePreferences = (localPreferencesMap.keys + remotePreferencesMap.keys).distinct().mapNotNull { sourceKey -> + val mergedSourcePreferences = (localPreferencesMap.keys + remotePreferencesMap.keys).distinct().mapNotNull { + sourceKey -> val localSourcePreference = localPreferencesMap[sourceKey] val remoteSourcePreference = remotePreferencesMap[sourceKey] @@ -463,7 +465,8 @@ abstract class SyncService( } localSourcePreference != null && remoteSourcePreference != null -> { // Merge the individual preferences within the source preferences - val mergedPrefs = mergeIndividualPreferences(localSourcePreference.prefs, remoteSourcePreference.prefs) + val mergedPrefs = + mergeIndividualPreferences(localSourcePreference.prefs, remoteSourcePreference.prefs) BackupSourcePreferences(sourceKey, mergedPrefs) } else -> null @@ -479,7 +482,7 @@ abstract class SyncService( private fun mergeIndividualPreferences( localPrefs: List, - remotePrefs: List + remotePrefs: List, ): List { val mergedPrefsMap = (localPrefs + remotePrefs).associateBy { it.key } return mergedPrefsMap.values.toList()