Skip to content

Commit da0de83

Browse files
committed
debug camera
1 parent dedf705 commit da0de83

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

src/views/CreateIdentyScreen.jsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,18 @@ class CreateIdentyScreen extends Component {
6868
};
6969

7070
pickImage = async () => {
71-
const isCameraPermitted = await this.requestCameraPermission();
72-
const isStoragePermitted = await this.requestExternalWritePermission();
73-
74-
if (isCameraPermitted && isStoragePermitted) {
75-
const result = await launchCamera({
76-
mediaType: 'photo',
77-
includeBase64: true,
78-
maxHeight: 300,
79-
maxWidth: 300,
80-
});
81-
82-
if (!result.didCancel) {
83-
this.setState({ photo: result.assets[0].uri });
84-
}
71+
await this.requestCameraPermission();
72+
await this.requestExternalWritePermission();
73+
74+
const result = await launchCamera({
75+
mediaType: 'photo',
76+
includeBase64: true,
77+
maxHeight: 300,
78+
maxWidth: 300,
79+
});
80+
81+
if (!result.didCancel) {
82+
this.setState({ photo: result.assets[0].uri });
8583
}
8684
};
8785

0 commit comments

Comments
 (0)