mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Improve and centralize e164 utils.
This commit is contained in:
@@ -116,7 +116,7 @@ public class AddMembersActivity extends PushContactSelectionActivity implements
|
||||
|
||||
AlertDialog progress = SimpleProgressDialog.show(this);
|
||||
|
||||
SimpleTask.run(getLifecycle(), () -> RecipientRepository.lookupNewE164(this, number), result -> {
|
||||
SimpleTask.run(getLifecycle(), () -> RecipientRepository.lookupNewE164(number), result -> {
|
||||
progress.dismiss();
|
||||
|
||||
if (result instanceof RecipientRepository.LookupResult.Success) {
|
||||
|
||||
@@ -23,7 +23,7 @@ final class AddMembersRepository {
|
||||
|
||||
@WorkerThread
|
||||
RecipientId getOrCreateRecipientId(@NonNull SelectedContact selectedContact) {
|
||||
return selectedContact.getOrCreateRecipientId(context);
|
||||
return selectedContact.getOrCreateRecipientId();
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
|
||||
@@ -159,7 +159,7 @@ public final class AddToGroupsActivity extends ContactSelectionActivity {
|
||||
|
||||
private void handleNextPressed() {
|
||||
List<RecipientId> groupsRecipientIds = Stream.of(contactsFragment.getSelectedContacts())
|
||||
.map(selectedContact -> selectedContact.getOrCreateRecipientId(this))
|
||||
.map(selectedContact -> selectedContact.getOrCreateRecipientId())
|
||||
.toList();
|
||||
|
||||
viewModel.onContinueWithSelection(groupsRecipientIds);
|
||||
|
||||
@@ -124,7 +124,7 @@ public class CreateGroupActivity extends ContactSelectionActivity implements Con
|
||||
|
||||
AlertDialog progress = SimpleProgressDialog.show(this);
|
||||
|
||||
SimpleTask.run(getLifecycle(), () -> RecipientRepository.lookupNewE164(this, number), result -> {
|
||||
SimpleTask.run(getLifecycle(), () -> RecipientRepository.lookupNewE164(number), result -> {
|
||||
progress.dismiss();
|
||||
|
||||
if (result instanceof RecipientRepository.LookupResult.Success) {
|
||||
@@ -194,7 +194,7 @@ public class CreateGroupActivity extends ContactSelectionActivity implements Con
|
||||
SimpleTask.run(getLifecycle(), () -> {
|
||||
List<RecipientId> ids = contactsFragment.getSelectedContacts()
|
||||
.stream()
|
||||
.map(selectedContact -> selectedContact.getOrCreateRecipientId(this))
|
||||
.map(selectedContact -> selectedContact.getOrCreateRecipientId())
|
||||
.collect(Collectors.toList());
|
||||
|
||||
List<Recipient> resolved = Recipient.resolvedList(ids);
|
||||
|
||||
Reference in New Issue
Block a user