mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 12:38:33 +00:00
Fix issue where structured contact name syncing was delayed.
This commit is contained in:
committed by
Cody Henthorne
parent
f3669a5865
commit
a64a02fa0c
@@ -11,10 +11,12 @@ import org.signal.core.util.Stopwatch
|
|||||||
import org.signal.core.util.logging.Log
|
import org.signal.core.util.logging.Log
|
||||||
import org.thoughtcrime.securesms.BuildConfig
|
import org.thoughtcrime.securesms.BuildConfig
|
||||||
import org.thoughtcrime.securesms.R
|
import org.thoughtcrime.securesms.R
|
||||||
|
import org.thoughtcrime.securesms.contacts.sync.ContactDiscovery
|
||||||
import org.thoughtcrime.securesms.database.SignalDatabase
|
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||||
import org.thoughtcrime.securesms.jobmanager.Job
|
import org.thoughtcrime.securesms.jobmanager.Job
|
||||||
import org.thoughtcrime.securesms.permissions.Permissions
|
import org.thoughtcrime.securesms.permissions.Permissions
|
||||||
import org.thoughtcrime.securesms.phonenumbers.PhoneNumberFormatter
|
import org.thoughtcrime.securesms.phonenumbers.PhoneNumberFormatter
|
||||||
|
import org.thoughtcrime.securesms.storage.StorageSyncHelper
|
||||||
import java.lang.Exception
|
import java.lang.Exception
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -71,6 +73,11 @@ class SyncSystemContactLinksJob private constructor(parameters: Parameters) : Ba
|
|||||||
)
|
)
|
||||||
stopwatch.split("add-links")
|
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)
|
stopwatch.stop(TAG)
|
||||||
} catch (e: RemoteException) {
|
} catch (e: RemoteException) {
|
||||||
Log.w(TAG, "[addSystemContactLinks] Failed to add links to contacts.", e)
|
Log.w(TAG, "[addSystemContactLinks] Failed to add links to contacts.", e)
|
||||||
|
|||||||
Reference in New Issue
Block a user