@plusscommunities/pluss-core-app 1.3.0 → 1.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plusscommunities/pluss-core-app",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Core extension package for Pluss Communities platform",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -21,7 +21,6 @@
21
21
  "expo-image-picker": "~10.1.4",
22
22
  "expo-linear-gradient": "~9.1.0",
23
23
  "expo-media-library": "~12.0.2",
24
- "expo-permissions": "~12.0.1",
25
24
  "expo-screen-orientation": "~3.1.0",
26
25
  "expo-sharing": "~9.1.2",
27
26
  "expo-video-player": "^1.6.0",
@@ -28,7 +28,6 @@ class CommentSection extends Component {
28
28
 
29
29
  componentDidMount() {
30
30
  this.getNotificationSate();
31
- // setTimeout(this.getNotificationSate, 3000);
32
31
 
33
32
  if (!_.includes(this.props.user.hidden, 'viewComment')) {
34
33
  this.getComments();
@@ -3,7 +3,7 @@ import { View, ScrollView, TouchableOpacity, Text, Platform, Linking, Modal, Dim
3
3
  import { connect } from 'react-redux';
4
4
  import { Icon } from 'react-native-elements';
5
5
  import _ from 'lodash';
6
- import * as Permissions from 'expo-permissions';
6
+ import { Camera } from 'expo-camera';
7
7
  import * as MediaLibrary from 'expo-media-library';
8
8
  import * as ImageManipulator from 'expo-image-manipulator';
9
9
  import * as ImagePicker from 'expo-image-picker';
@@ -60,7 +60,7 @@ class ImageUploader extends Component {
60
60
  }
61
61
 
62
62
  loadLocalAlbums = async () => {
63
- const hasPermission = await Permissions.getAsync(Permissions.CAMERA_ROLL);
63
+ const hasPermission = await MediaLibrary.getPermissionsAsync();
64
64
  if (!hasPermission.granted) return;
65
65
 
66
66
  this.setState({ loadingLocalFolders: true }, async () => {
@@ -254,8 +254,8 @@ class ImageUploader extends Component {
254
254
  }
255
255
 
256
256
  askPermissionsAsync = async () => {
257
- const cameraPermission = await Permissions.askAsync(Permissions.CAMERA);
258
- const rollPermission = await Permissions.askAsync(Permissions.CAMERA_ROLL);
257
+ const cameraPermission = await Camera.requestCameraPermissionsAsync();
258
+ const rollPermission = await MediaLibrary.requestPermissionsAsync();
259
259
  if (cameraPermission.status !== 'granted' || rollPermission.status !== 'granted') {
260
260
  this.showWarningPopup(cameraPermission.status !== 'granted', rollPermission.status !== 'granted');
261
261
  return false;
@@ -3,7 +3,7 @@ import { StyleSheet, View, FlatList, Dimensions, ActivityIndicator, Platform } f
3
3
  import _ from 'lodash';
4
4
  import * as ScreenOrientation from 'expo-screen-orientation';
5
5
  import * as MediaLibrary from 'expo-media-library';
6
- import * as Permissions from 'expo-permissions';
6
+ import { Camera } from 'expo-camera';
7
7
  import { isVideo } from '../../helper';
8
8
  import ImageTile from './ImageTile';
9
9
 
@@ -49,8 +49,8 @@ export default class ImageBrowser extends React.Component {
49
49
  };
50
50
 
51
51
  getPermissionsAsync = async () => {
52
- const { status: camera } = await Permissions.askAsync(Permissions.CAMERA);
53
- const { status: cameraRoll } = await Permissions.askAsync(Permissions.CAMERA_ROLL);
52
+ const { status: camera } = await Camera.requestCameraPermissionsAsync();
53
+ const { status: cameraRoll } = await MediaLibrary.requestPermissionsAsync();
54
54
  this.setState({
55
55
  hasCameraPermission: camera === 'granted',
56
56
  hasCameraRollPermission: cameraRoll === 'granted',