fix: microphone persmission request wasn't appearing (#418)

This commit is contained in:
Antonio Sousa 2021-09-11 14:55:25 -03:00 committed by GitHub
parent 58e586220e
commit 76137751b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,7 @@ export const Splash: NavigationFunctionComponent = ({ componentId }) => {
}, []); }, []);
useEffect(() => { useEffect(() => {
if (cameraPermissionStatus === 'authorized' && microphonePermissionStatus !== 'not-determined') { if (cameraPermissionStatus === 'authorized' && microphonePermissionStatus === 'authorized') {
Navigation.setRoot({ Navigation.setRoot({
root: { root: {
stack: { stack: {
@ -77,7 +77,7 @@ export const Splash: NavigationFunctionComponent = ({ componentId }) => {
</Text> </Text>
</Text> </Text>
)} )}
{microphonePermissionStatus === 'not-determined' && ( {microphonePermissionStatus !== 'authorized' && (
<Text style={styles.permissionText}> <Text style={styles.permissionText}>
Vision Camera needs <Text style={styles.bold}>Microphone permission</Text>. Vision Camera needs <Text style={styles.bold}>Microphone permission</Text>.
<Text style={styles.hyperlink} onPress={requestMicrophonePermission}> <Text style={styles.hyperlink} onPress={requestMicrophonePermission}>