Fix issue where structured contact name syncing was delayed.
This commit is contained in:
parent
f3669a5865
commit
a64a02fa0c
1 changed files with 7 additions and 0 deletions
|
@ -11,10 +11,12 @@ import org.signal.core.util.Stopwatch
|
|||
import org.signal.core.util.logging.Log
|
||||
import org.thoughtcrime.securesms.BuildConfig
|
||||
import org.thoughtcrime.securesms.R
|
||||
import org.thoughtcrime.securesms.contacts.sync.ContactDiscovery
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||
import org.thoughtcrime.securesms.jobmanager.Job
|
||||
import org.thoughtcrime.securesms.permissions.Permissions
|
||||
import org.thoughtcrime.securesms.phonenumbers.PhoneNumberFormatter
|
||||
import org.thoughtcrime.securesms.storage.StorageSyncHelper
|
||||
import java.lang.Exception
|
||||
|
||||
/**
|
||||
|
@ -71,6 +73,11 @@ class SyncSystemContactLinksJob private constructor(parameters: Parameters) : Ba
|
|||
)
|
||||
stopwatch.split("add-links")
|
||||
|
||||
// Adding links changes how certain structured name records are stored, so we need to re-sync to make sure we get the latest structured name
|
||||
ContactDiscovery.syncRecipientInfoWithSystemContacts(context)
|
||||
StorageSyncHelper.scheduleSyncForDataChange()
|
||||
stopwatch.split("sync-contact-info")
|
||||
|
||||
stopwatch.stop(TAG)
|
||||
} catch (e: RemoteException) {
|
||||
Log.w(TAG, "[addSystemContactLinks] Failed to add links to contacts.", e)
|
||||
|
|
Loading…
Add table
Reference in a new issue