|
|
@ -177,7 +177,6 @@ public class ContactShareViewHelper: NSObject, CNContactViewControllerDelegate {
|
|
|
|
UIUtil.applyDefaultSystemAppearence()
|
|
|
|
UIUtil.applyDefaultSystemAppearence()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// MJK TODO fromNavigationController?
|
|
|
|
|
|
|
|
private func presentSelectAddToExistingContactView(contactShare: ContactShareViewModel, fromViewController: UIViewController) {
|
|
|
|
private func presentSelectAddToExistingContactView(contactShare: ContactShareViewModel, fromViewController: UIViewController) {
|
|
|
|
guard contactsManager.supportsContactEditing else {
|
|
|
|
guard contactsManager.supportsContactEditing else {
|
|
|
|
owsFail("\(logTag) Contact editing not supported")
|
|
|
|
owsFail("\(logTag) Contact editing not supported")
|
|
|
@ -188,17 +187,6 @@ public class ContactShareViewHelper: NSObject, CNContactViewControllerDelegate {
|
|
|
|
ContactsViewHelper.presentMissingContactAccessAlertController(from: fromViewController)
|
|
|
|
ContactsViewHelper.presentMissingContactAccessAlertController(from: fromViewController)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//
|
|
|
|
|
|
|
|
// // TODO: Revisit this.
|
|
|
|
|
|
|
|
// guard let firstPhoneNumber = contactShare.e164PhoneNumbers().first else {
|
|
|
|
|
|
|
|
// owsFail("\(logTag) Missing phone number.")
|
|
|
|
|
|
|
|
// return
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// // TODO: We need to modify OWSAddToContactViewController to take a OWSContact
|
|
|
|
|
|
|
|
// // and merge it with an existing CNContact.
|
|
|
|
|
|
|
|
// let viewController = OWSAddToContactViewController()
|
|
|
|
|
|
|
|
// viewController.configure(withRecipientId: firstPhoneNumber)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
guard let navigationController = fromViewController.navigationController else {
|
|
|
|
guard let navigationController = fromViewController.navigationController else {
|
|
|
|
owsFail("\(logTag) missing navigationController")
|
|
|
|
owsFail("\(logTag) missing navigationController")
|
|
|
@ -206,7 +194,6 @@ public class ContactShareViewHelper: NSObject, CNContactViewControllerDelegate {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let viewController = AddContactShareToExistingContactViewController(contactShare: contactShare)
|
|
|
|
let viewController = AddContactShareToExistingContactViewController(contactShare: contactShare)
|
|
|
|
// viewController.addToExistingContactDelegate = fromViewController
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
navigationController.pushViewController(viewController, animated: true)
|
|
|
|
navigationController.pushViewController(viewController, animated: true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|