updated a bit

This commit is contained in:
u-e 2018-12-21 18:13:41 +03:00
parent 10487202d5
commit 502d217996
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({
getState: this._getState,
setState: (state, callback) => {

View File

@ -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 ->