Fix Expo permissions deprecation warnings

This commit is contained in:
Nat 2021-07-09 11:35:08 -03:00
parent bae5e9ad70
commit 81b60209c3
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ const SettingsJsx = (props) => {
}, []); }, []);
const _handleChangeProfilePhoto = async () => { const _handleChangeProfilePhoto = async () => {
await ImagePicker.getCameraRollPermissionsAsync() await ImagePicker.getMediaLibraryPermissionsAsync()
const { uri } = await ImagePicker.launchImageLibraryAsync({ const { uri } = await ImagePicker.launchImageLibraryAsync({
allowsEditing: true, allowsEditing: true,

View File

@ -35,7 +35,7 @@ const PublishJsx = ({ navigation }) => {
instance = instancePair[1]; instance = instancePair[1];
accessToken = JSON.parse(tokenPair[1]).access_token; accessToken = JSON.parse(tokenPair[1]).access_token;
return Permissions.askAsync(Permissions.CAMERA_ROLL); return ImagePicker.getMediaLibraryPermissionsAsync();
}) })
.then(({ granted }) => { .then(({ granted }) => {
if (granted) { if (granted) {