diff --git a/app/src/androidTest/kotlin/at/bitfire/davdroid/sync/SyncerTest.kt b/app/src/androidTest/kotlin/at/bitfire/davdroid/sync/SyncerTest.kt index 20f2e2277..dba48720e 100644 --- a/app/src/androidTest/kotlin/at/bitfire/davdroid/sync/SyncerTest.kt +++ b/app/src/androidTest/kotlin/at/bitfire/davdroid/sync/SyncerTest.kt @@ -137,8 +137,8 @@ class SyncerTest { every { dbCollection.url } returns "http://newly.found/collection".toHttpUrl() // Should return list of newly created local collections - val newLocalCollections = syncer.createLocalCollections(provider, listOf(dbCollection)) - assertEquals(listOf(localCollection), newLocalCollections) + val result = syncer.createLocalCollections(provider, listOf(dbCollection)) + assertEquals(listOf(localCollection), result) } diff --git a/app/src/main/kotlin/at/bitfire/davdroid/sync/Syncer.kt b/app/src/main/kotlin/at/bitfire/davdroid/sync/Syncer.kt index 6f76ff54d..a3e4bc317 100644 --- a/app/src/main/kotlin/at/bitfire/davdroid/sync/Syncer.kt +++ b/app/src/main/kotlin/at/bitfire/davdroid/sync/Syncer.kt @@ -122,11 +122,11 @@ abstract class Syncer>( } /** - * Updates and deletes local collections. Specifically: + * Updates and deletes local collections. * * - Updates local collections with possibly new info from corresponding database collections. - * - Deletes local collections if corresponding database collections are missing. - * - Creates local collections if database collections without local match are available. + * - Deletes local collections without a corresponding database collection. + * - Creates local collections for database collections without local match. * * @param provider Content provider client, used to create local collections * @param localCollections The current local collections