From 81b60209c313c019c4a1e8fb3c73784313d2617b Mon Sep 17 00:00:00 2001 From: natjms Date: Fri, 9 Jul 2021 11:35:08 -0300 Subject: [PATCH] Fix Expo permissions deprecation warnings --- src/components/pages/profile/settings.js | 2 +- src/components/pages/publish.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/pages/profile/settings.js b/src/components/pages/profile/settings.js index dbf8d85..539e605 100644 --- a/src/components/pages/profile/settings.js +++ b/src/components/pages/profile/settings.js @@ -89,7 +89,7 @@ const SettingsJsx = (props) => { }, []); const _handleChangeProfilePhoto = async () => { - await ImagePicker.getCameraRollPermissionsAsync() + await ImagePicker.getMediaLibraryPermissionsAsync() const { uri } = await ImagePicker.launchImageLibraryAsync({ allowsEditing: true, diff --git a/src/components/pages/publish.js b/src/components/pages/publish.js index caae875..26e0fdd 100644 --- a/src/components/pages/publish.js +++ b/src/components/pages/publish.js @@ -35,7 +35,7 @@ const PublishJsx = ({ navigation }) => { instance = instancePair[1]; accessToken = JSON.parse(tokenPair[1]).access_token; - return Permissions.askAsync(Permissions.CAMERA_ROLL); + return ImagePicker.getMediaLibraryPermissionsAsync(); }) .then(({ granted }) => { if (granted) {