react-native-contacts 7.0.3 → 7.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/foo.js +1 -0
- package/index.d.ts +1 -0
- package/ios/RCTContacts/RCTContacts.m +5 -1
- package/package.json +1 -1
package/foo.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log('hello')
|
package/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export function getPhotoForId(contactId: string): Promise<string>;
|
|
|
6
6
|
export function addContact(contact: Contact): Promise<void>;
|
|
7
7
|
export function openContactForm(contact: Partial<Contact>): Promise<Contact>;
|
|
8
8
|
export function openExistingContact(contact: Contact): Promise<Contact>;
|
|
9
|
+
export function viewExistingContact(contact: { recordID: string }): Promise<Contact | void>
|
|
9
10
|
export function editExistingContact(contact: Contact): Promise<Contact>;
|
|
10
11
|
export function updateContact(contact: Contact): Promise<void>;
|
|
11
12
|
export function deleteContact(contact: Contact): Promise<void>;
|
|
@@ -706,7 +706,7 @@ RCT_EXPORT_METHOD(openExistingContact:(NSDictionary *)contactData resolver:(RCTP
|
|
|
706
706
|
CNContactViewController *contactViewController = [CNContactViewController viewControllerForContact:contact];
|
|
707
707
|
|
|
708
708
|
// Add a cancel button which will close the view
|
|
709
|
-
contactViewController.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:backTitle == nil ? @"Cancel" : backTitle style:
|
|
709
|
+
contactViewController.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:backTitle == nil ? @"Cancel" : backTitle style:UIBarButtonItemStyleDone target:self action:@selector(cancelContactForm)];
|
|
710
710
|
contactViewController.delegate = self;
|
|
711
711
|
|
|
712
712
|
|
|
@@ -933,6 +933,10 @@ RCT_EXPORT_METHOD(editExistingContact:(NSDictionary *)contactData resolver:(RCTP
|
|
|
933
933
|
{
|
|
934
934
|
if (updateContactPromise != nil) {
|
|
935
935
|
UIViewController *rootViewController = (UIViewController*)[[[[UIApplication sharedApplication] delegate] window] rootViewController];
|
|
936
|
+
while (rootViewController.presentedViewController)
|
|
937
|
+
{
|
|
938
|
+
rootViewController = rootViewController.presentedViewController;
|
|
939
|
+
}
|
|
936
940
|
[rootViewController dismissViewControllerAnimated:YES completion:nil];
|
|
937
941
|
|
|
938
942
|
updateContactPromise(nil);
|