Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
fix(android): fix empty popup
Browse files Browse the repository at this point in the history
fix empty popup when not set android*PermissionOptions props.
  • Loading branch information
lihroff committed Mar 13, 2020
1 parent 944c304 commit 407295b
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/RNCamera.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ const Rationale = PropTypes.shape({
const requestPermissions = async (
captureAudio: boolean,
CameraManager: any,
androidCameraPermissionOptions: Rationale,
androidRecordAudioPermissionOptions: Rationale,
androidCameraPermissionOptions: Rationale | null,
androidRecordAudioPermissionOptions: Rationale | null,
): Promise<{ hasCameraPermissions: boolean, hasRecordAudioPermissions: boolean }> => {
let hasCameraPermissions = false;
let hasRecordAudioPermissions = false;
Expand Down Expand Up @@ -458,14 +458,8 @@ export default class Camera extends React.Component<PropsType, StateType> {
faceDetectionClassifications: ((CameraManager.FaceDetection || {}).Classifications || {}).none,
permissionDialogTitle: '',
permissionDialogMessage: '',
androidCameraPermissionOptions: {
title: '',
message: '',
},
androidRecordAudioPermissionOptions: {
title: '',
message: '',
},
androidCameraPermissionOptions: null,
androidRecordAudioPermissionOptions: null,
notAuthorizedView: (
<View style={styles.authorizationContainer}>
<Text style={styles.notAuthorizedText}>Camera not authorized</Text>
Expand Down

0 comments on commit 407295b

Please sign in to comment.