diff --git a/src/components/markdownEditor/view/markdownEditorView.js b/src/components/markdownEditor/view/markdownEditorView.js index 79e09c408..6e07158d8 100644 --- a/src/components/markdownEditor/view/markdownEditorView.js +++ b/src/components/markdownEditor/view/markdownEditorView.js @@ -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({ getState: this._getState, setState: (state, callback) => { diff --git a/src/screens/editor/container/editorContainer.js b/src/screens/editor/container/editorContainer.js index d78dfd5d9..4c33b1caf 100644 --- a/src/screens/editor/container/editorContainer.js +++ b/src/screens/editor/container/editorContainer.js @@ -102,9 +102,9 @@ class EditorContainer extends Component { _handleOpenImagePicker = () => { ImagePicker.openPicker({ - //width: 300, - //height: 400, - //cropping: true, + // width: 300, + // height: 400, + // cropping: true, // writeTempFile: true, // includeBase64: true, // multiple: true, @@ -119,9 +119,9 @@ class EditorContainer extends Component { _handleOpenCamera = () => { ImagePicker.openCamera({ - //width: 300, - //height: 400, - //cropping: true, + // width: 300, + // height: 400, + // cropping: true, // includeBase64: true, }) .then((image) => { @@ -168,12 +168,14 @@ class EditorContainer extends Component { }; _handleMediaOnSelectFailure = (error) => { - // const { navigation } = this.props; this.setState({ isCameraOrPickerOpen: false }); - Alert.alert( - 'Permission Denied', - 'Please, go to phone Settings and change eSteem app permissions.', - ); + + if (error.code === 'E_PERMISSION_MISSING') { + Alert.alert( + 'Permission Denied', + 'Please, go to phone Settings and change eSteem app permissions.', + ); + } }; // Media select functions <- END ->