expo-contacts
Advanced tools
Comparing version
@@ -6,5 +6,2 @@ import { UnavailabilityError } from '@unimodules/core'; | ||
export async function shareContactAsync(contactId, message, shareOptions = {}) { | ||
if (!ExpoContacts.shareContactAsync) { | ||
throw new UnavailabilityError('Contacts', 'shareContactAsync'); | ||
} | ||
if (Platform.OS === 'ios') { | ||
@@ -19,5 +16,6 @@ const url = await writeContactToFileAsync({ | ||
} | ||
else { | ||
return await ExpoContacts.shareContactAsync(contactId, message); | ||
else if (!ExpoContacts.shareContactAsync) { | ||
throw new UnavailabilityError('Contacts', 'shareContactAsync'); | ||
} | ||
return await ExpoContacts.shareContactAsync(contactId, message); | ||
} | ||
@@ -24,0 +22,0 @@ export async function getContactsAsync(contactQuery = {}) { |
{ | ||
"name": "expo-contacts", | ||
"version": "5.0.2", | ||
"version": "6.0.0-rc.0", | ||
"description": "Provides access to the phone's system contacts.", | ||
@@ -43,3 +43,3 @@ "main": "build/Contacts.js", | ||
}, | ||
"gitHead": "f213c9be2a909dae42a0a27d8aa4b9eac8e97be1" | ||
} | ||
"gitHead": "6334f82adccb529e9347e348c874bd8f6a92cacc" | ||
} |
@@ -240,5 +240,2 @@ import { UnavailabilityError } from '@unimodules/core'; | ||
): Promise<any> { | ||
if (!ExpoContacts.shareContactAsync) { | ||
throw new UnavailabilityError('Contacts', 'shareContactAsync'); | ||
} | ||
if (Platform.OS === 'ios') { | ||
@@ -253,7 +250,9 @@ const url = await writeContactToFileAsync({ | ||
}, | ||
shareOptions | ||
shareOptions, | ||
); | ||
} else { | ||
return await ExpoContacts.shareContactAsync(contactId, message); | ||
} else if (!ExpoContacts.shareContactAsync) { | ||
throw new UnavailabilityError('Contacts', 'shareContactAsync'); | ||
} | ||
return await ExpoContacts.shareContactAsync(contactId, message); | ||
} | ||
@@ -260,0 +259,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
216383
-0.05%2787
-0.18%