Don't cache CNContact.

pull/1/head
Matthew Chen 7 years ago
parent 41a2ea03b0
commit af977ca409

@ -60,13 +60,11 @@ class AddContactShareToExistingContactViewController: ContactsPicker, ContactsPi
let contactsManager = Environment.current().contactsManager
guard let oldCNContact = contactsManager?.cnContact(withId: oldContact.cnContactId) else {
// TODO: Alert?
Logger.warn("\(logTag) could not load old CNContact.")
owsFail("\(logTag) could not load old CNContact.")
return
}
guard let newCNContact = OWSContacts.systemContact(for: self.contactShare.dbRecord, imageData: self.contactShare.avatarImageData) else {
// TODO: Alert?
Logger.warn("\(logTag) could not load new CNContact.")
owsFail("\(logTag) could not load new CNContact.")
return
}
merge(oldCNContact: oldCNContact, newCNContact: newCNContact)

Loading…
Cancel
Save