Cleanup
This commit is contained in:
parent
93e2c58fcf
commit
a4e22539a3
@ -26,8 +26,7 @@ public class JsonContactsStore {
|
||||
}
|
||||
|
||||
ContactInfo getContact(String number) {
|
||||
ContactInfo c = contacts.get(number);
|
||||
return c;
|
||||
return contacts.get(number);
|
||||
}
|
||||
|
||||
List<ContactInfo> getContacts() {
|
||||
|
@ -1041,8 +1041,11 @@ class Manager implements Signal {
|
||||
DeviceContactsInputStream s = new DeviceContactsInputStream(retrieveAttachmentAsStream(syncMessage.getContacts().get().asPointer()));
|
||||
DeviceContact c;
|
||||
while ((c = s.read()) != null) {
|
||||
ContactInfo contact = new ContactInfo();
|
||||
contact.number = c.getNumber();
|
||||
ContactInfo contact = contactStore.getContact(c.getNumber());
|
||||
if (contact == null) {
|
||||
contact = new ContactInfo();
|
||||
contact.number = c.getNumber();
|
||||
}
|
||||
if (c.getName().isPresent()) {
|
||||
contact.name = c.getName().get();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user