mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 18:30:20 +01:00
Migrate local account data into SignalStore.
This commit is contained in:
committed by
Cody Henthorne
parent
87f175a96b
commit
8aea20f147
@@ -16,6 +16,7 @@ import org.thoughtcrime.securesms.contacts.sync.DirectoryHelper;
|
||||
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||
import org.thoughtcrime.securesms.jobs.DirectoryRefreshJob;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.util.SetUtil;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
@@ -43,7 +44,7 @@ public class ContactsSyncAdapter extends AbstractThreadedSyncAdapter {
|
||||
|
||||
Context context = getContext();
|
||||
|
||||
if (!TextSecurePreferences.isPushRegistered(context)) {
|
||||
if (!SignalStore.account().isRegistered()) {
|
||||
Log.i(TAG, "Not push registered. Just syncing contact info.");
|
||||
DirectoryHelper.syncRecipientInfoWithSystemContacts(context);
|
||||
return;
|
||||
|
||||
@@ -82,7 +82,7 @@ public class DirectoryHelper {
|
||||
|
||||
@WorkerThread
|
||||
public static void refreshDirectory(@NonNull Context context, boolean notifyOfNewUsers) throws IOException {
|
||||
if (TextUtils.isEmpty(TextSecurePreferences.getLocalNumber(context))) {
|
||||
if (TextUtils.isEmpty(SignalStore.account().getE164())) {
|
||||
Log.w(TAG, "Have not yet set our own local number. Skipping.");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user