Compare commits

...

2 commits

Author SHA1 Message Date
Akinwale Ariwodola
106e4103ce i18n all the strings 2019-09-30 12:54:56 +01:00
Akinwale Ariwodola
2b3d61e418 show the camera after the required permissions have been granted 2019-09-27 12:09:55 +01:00

View file

@ -870,6 +870,7 @@ class PublishPage extends React.PureComponent {
const { const {
allThumbnailsChecked, allThumbnailsChecked,
canUseCamera, canUseCamera,
showCameraOverlay,
currentPhase, currentPhase,
checkedThumbnails, checkedThumbnails,
loadingVideos, loadingVideos,
@ -882,7 +883,9 @@ class PublishPage extends React.PureComponent {
content = ( content = (
<View style={publishStyle.gallerySelector}> <View style={publishStyle.gallerySelector}>
<View style={publishStyle.actionsView}> <View style={publishStyle.actionsView}>
{canUseCamera && <RNCamera style={publishStyle.cameraPreview} type={RNCamera.Constants.Type.back} />} {canUseCamera && !showCameraOverlay && (
<RNCamera captureAudio={false} style={publishStyle.cameraPreview} type={RNCamera.Constants.Type.back} />
)}
<View style={publishStyle.actionsSubView}> <View style={publishStyle.actionsSubView}>
<TouchableOpacity <TouchableOpacity
style={[ style={[
@ -1236,8 +1239,9 @@ class PublishPage extends React.PureComponent {
{false && Constants.PHASE_SELECTOR !== this.state.currentPhase && ( {false && Constants.PHASE_SELECTOR !== this.state.currentPhase && (
<FloatingWalletBalance navigation={navigation} /> <FloatingWalletBalance navigation={navigation} />
)} )}
{this.state.canUseCamera && this.state.showCameraOverlay && ( {this.state.showCameraOverlay && (
<View style={publishStyle.cameraOverlay}> <View style={publishStyle.cameraOverlay}>
{this.state.canUseCamera && (
<RNCamera <RNCamera
captureAudio={this.state.videoRecordingMode} captureAudio={this.state.videoRecordingMode}
style={publishStyle.fullCamera} style={publishStyle.fullCamera}
@ -1247,16 +1251,16 @@ class PublishPage extends React.PureComponent {
type={this.state.cameraType} type={this.state.cameraType}
flashMode={RNCamera.Constants.FlashMode.off} flashMode={RNCamera.Constants.FlashMode.off}
androidCameraPermissionOptions={{ androidCameraPermissionOptions={{
title: 'Camera', title: __('Camera'),
message: 'Please grant access to make use of your camera', message: __('Please grant access to make use of your camera'),
buttonPositive: 'OK', buttonPositive: __('OK'),
buttonNegative: 'Cancel', buttonNegative: __('Cancel'),
}} }}
androidRecordAudioPermissionOptions={{ androidRecordAudioPermissionOptions={{
title: 'Audio', title: __('Audio'),
message: 'Please grant access to record audio', message: __('Please grant access to record audio'),
buttonPositive: 'OK', buttonPositive: __('OK'),
buttonNegative: 'Cancel', buttonNegative: __('Cancel'),
}} }}
notAuthorizedView={ notAuthorizedView={
<View style={publishStyle.fullCentered}> <View style={publishStyle.fullCentered}>
@ -1264,6 +1268,7 @@ class PublishPage extends React.PureComponent {
</View> </View>
} }
/> />
)}
<View <View
style={[ style={[
publishStyle.cameraControls, publishStyle.cameraControls,