updated a bit

This commit is contained in:
u-e 2018-12-21 18:13:41 +03:00
parent 8ce18f1cab
commit 6b259e2563
2 changed files with 14 additions and 12 deletions

View File

@ -39,7 +39,7 @@ export default class MarkdownEditorView extends Component {
}); });
} }
if (nextProps.uploadedImage && nextProps.uploadedImage !== uploadedImage) { if (nextProps.uploadedImage && nextProps.uploadedImage.url && nextProps.uploadedImage !== uploadedImage) {
applyImageLink({ applyImageLink({
getState: this._getState, getState: this._getState,
setState: (state, callback) => { setState: (state, callback) => {

View File

@ -102,9 +102,9 @@ class EditorContainer extends Component {
_handleOpenImagePicker = () => { _handleOpenImagePicker = () => {
ImagePicker.openPicker({ ImagePicker.openPicker({
//width: 300, // width: 300,
//height: 400, // height: 400,
//cropping: true, // cropping: true,
// writeTempFile: true, // writeTempFile: true,
// includeBase64: true, // includeBase64: true,
// multiple: true, // multiple: true,
@ -119,9 +119,9 @@ class EditorContainer extends Component {
_handleOpenCamera = () => { _handleOpenCamera = () => {
ImagePicker.openCamera({ ImagePicker.openCamera({
//width: 300, // width: 300,
//height: 400, // height: 400,
//cropping: true, // cropping: true,
// includeBase64: true, // includeBase64: true,
}) })
.then((image) => { .then((image) => {
@ -168,12 +168,14 @@ class EditorContainer extends Component {
}; };
_handleMediaOnSelectFailure = (error) => { _handleMediaOnSelectFailure = (error) => {
// const { navigation } = this.props;
this.setState({ isCameraOrPickerOpen: false }); this.setState({ isCameraOrPickerOpen: false });
Alert.alert(
'Permission Denied', if (error.code === 'E_PERMISSION_MISSING') {
'Please, go to phone Settings and change eSteem app permissions.', Alert.alert(
); 'Permission Denied',
'Please, go to phone Settings and change eSteem app permissions.',
);
}
}; };
// Media select functions <- END -> // Media select functions <- END ->