Skip to content

Commit d594ed5

Browse files
committed
cleanup
1 parent 6d21c0f commit d594ed5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

play-services-core/src/main/kotlin/org/microg/gms/people/SyncAdapterProxy.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class SyncAdapterProxy(context: Context) : AbstractThreadedSyncAdapter(context,
104104
updateList.add(values)
105105
}
106106
}
107-
insertList.takeIf { it.size > 0 }?.run {
107+
insertList.takeIf { it.isNotEmpty() }?.run {
108108
ContactSyncHelper.insertUpload(this, upload = {
109109
peopleClient.BulkInsertContacts().executeBlocking(it)
110110
}, sync = { contactId, person ->
@@ -115,14 +115,14 @@ class SyncAdapterProxy(context: Context) : AbstractThreadedSyncAdapter(context,
115115
ContactProviderHelper.get(context).syncContactPhoto(sourceId, account, provider, url, syncToken, bytes)
116116
})
117117
}
118-
deleteList.takeIf { it.size > 0 }?.run {
118+
deleteList.takeIf { it.isNotEmpty() }?.run {
119119
ContactSyncHelper.deletedUpload(this, upload = {
120120
peopleClient.DeletePeople().executeBlocking(it)
121121
}, sync = {
122122
ContactProviderHelper.get(context).deleteContact(it, account, syncResult, provider)
123123
})
124124
}
125-
updateList.takeIf { it.size > 0 }?.run {
125+
updateList.takeIf { it.isNotEmpty() }?.run {
126126
val groupInfo = ContactProviderHelper.get(context).getCurrentGroupList(account, provider).find { it.isDefault }
127127
ContactSyncHelper.dirtyUpload(this, groupInfo, upload = {
128128
runCatching { peopleClient.UpdatePerson().executeBlocking(it) }.getOrNull()
@@ -162,21 +162,21 @@ class SyncAdapterProxy(context: Context) : AbstractThreadedSyncAdapter(context,
162162
updatedGroups.add(groupInfo)
163163
}
164164
}
165-
createdGroups.takeIf { it.size > 0 }?.run {
165+
createdGroups.takeIf { it.isNotEmpty() }?.run {
166166
ContactSyncHelper.insertGroupUpload(this, upload = {
167167
peopleClient.CreateContactGroups().executeBlocking(it)
168168
}, sync = {
169169
ContactProviderHelper.get(context).syncPersonGroup(it, allGroupList, account, provider)
170170
})
171171
}
172-
updatedGroups.takeIf { it.size > 0 }?.run {
172+
updatedGroups.takeIf { it.isNotEmpty() }?.run {
173173
ContactSyncHelper.updateGroupUpload(this, upload = {
174174
peopleClient.UpdateContactGroups().executeBlocking(it)
175175
}, sync = {
176176
ContactProviderHelper.get(context).syncPersonGroup(it, allGroupList, account, provider)
177177
})
178178
}
179-
deletedGroups.takeIf { it.size > 0 }?.run {
179+
deletedGroups.takeIf { it.isNotEmpty() }?.run {
180180
ContactSyncHelper.deleteGroupUpload(this, upload = {
181181
peopleClient.DeleteContactGroups().executeBlocking(it)
182182
}, sync = {

0 commit comments

Comments
 (0)