mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 17:59:39 +02:00
don't use email address as contact unique identifier
This commit is contained in:
parent
8aedbc60a4
commit
fbf8637c97
9 changed files with 59 additions and 63 deletions
|
@ -244,10 +244,7 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity
|
|||
if (contactId == DcContact.DC_CONTACT_ID_ADD_MEMBER) {
|
||||
Intent intent = new Intent(this, ContactMultiSelectionActivity.class);
|
||||
intent.putExtra(ContactSelectionListFragment.SELECT_VERIFIED_EXTRA, verified);
|
||||
ArrayList<String> preselectedContacts = new ArrayList<>();
|
||||
for (int id : getAdapter().getContacts()) {
|
||||
preselectedContacts.add(dcContext.getContact(id).getAddr());
|
||||
}
|
||||
ArrayList<Integer> preselectedContacts = new ArrayList<>(getAdapter().getContacts());
|
||||
intent.putExtra(ContactSelectionListFragment.PRESELECTED_CONTACTS, preselectedContacts);
|
||||
startActivityForResult(intent, PICK_CONTACT);
|
||||
}
|
||||
|
@ -333,9 +330,9 @@ public class GroupCreateActivity extends PassphraseRequiredActionBarActivity
|
|||
|
||||
case PICK_CONTACT:
|
||||
ArrayList<Integer> contactIds = new ArrayList<>();
|
||||
for (String addr : Objects.requireNonNull(data.getStringArrayListExtra("contacts"))) {
|
||||
if(addr != null) {
|
||||
contactIds.add(dcContext.createContact(null, addr));
|
||||
for (Integer contactId : Objects.requireNonNull(data.getIntegerArrayListExtra(ContactMultiSelectionActivity.CONTACTS_EXTRA))) {
|
||||
if(contactId != null) {
|
||||
contactIds.add(contactId);
|
||||
}
|
||||
}
|
||||
getAdapter().changeData(contactIds);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue