From d407d698c8eec82c9685cf76634dd48867df15b2 Mon Sep 17 00:00:00 2001 From: KaiserBh Date: Fri, 12 Jan 2024 09:29:58 +1100 Subject: [PATCH] chore: lint --- .../tachiyomi/data/sync/service/SyncService.kt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) 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()