Always for a full contact sync via ContactDiscovery.refreshAll().
This commit is contained in:
parent
6f30aec4f2
commit
a911926119
1 changed files with 5 additions and 3 deletions
|
@ -73,7 +73,8 @@ object ContactDiscovery {
|
||||||
ContactDiscoveryRefreshV2.refreshAll(context, useCompat = FeatureFlags.cdsCompatMode())
|
ContactDiscoveryRefreshV2.refreshAll(context, useCompat = FeatureFlags.cdsCompatMode())
|
||||||
},
|
},
|
||||||
removeSystemContactLinksIfMissing = true,
|
removeSystemContactLinksIfMissing = true,
|
||||||
notifyOfNewUsers = notifyOfNewUsers
|
notifyOfNewUsers = notifyOfNewUsers,
|
||||||
|
forceFullSystemContactSync = true
|
||||||
)
|
)
|
||||||
|
|
||||||
StorageSyncHelper.scheduleSyncForDataChange()
|
StorageSyncHelper.scheduleSyncForDataChange()
|
||||||
|
@ -140,7 +141,8 @@ object ContactDiscovery {
|
||||||
descriptor: String,
|
descriptor: String,
|
||||||
refresh: () -> RefreshResult,
|
refresh: () -> RefreshResult,
|
||||||
removeSystemContactLinksIfMissing: Boolean,
|
removeSystemContactLinksIfMissing: Boolean,
|
||||||
notifyOfNewUsers: Boolean
|
notifyOfNewUsers: Boolean,
|
||||||
|
forceFullSystemContactSync: Boolean = false
|
||||||
): RefreshResult {
|
): RefreshResult {
|
||||||
val stopwatch = Stopwatch(descriptor)
|
val stopwatch = Stopwatch(descriptor)
|
||||||
|
|
||||||
|
@ -153,7 +155,7 @@ object ContactDiscovery {
|
||||||
if (hasContactsPermissions(context)) {
|
if (hasContactsPermissions(context)) {
|
||||||
ApplicationDependencies.getJobManager().add(SyncSystemContactLinksJob())
|
ApplicationDependencies.getJobManager().add(SyncSystemContactLinksJob())
|
||||||
|
|
||||||
val useFullSync = removeSystemContactLinksIfMissing && result.registeredIds.size > FULL_SYSTEM_CONTACT_SYNC_THRESHOLD
|
val useFullSync = forceFullSystemContactSync || (removeSystemContactLinksIfMissing && result.registeredIds.size > FULL_SYSTEM_CONTACT_SYNC_THRESHOLD)
|
||||||
syncRecipientsWithSystemContacts(
|
syncRecipientsWithSystemContacts(
|
||||||
context = context,
|
context = context,
|
||||||
rewrites = result.rewrites,
|
rewrites = result.rewrites,
|
||||||
|
|
Loading…
Add table
Reference in a new issue