mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-19 11:21:41 +03:00
commit
be1017b7ea
@ -116,8 +116,22 @@ export const UploadsGalleryModal = forwardRef(({username, handleOnSelect, handl
|
||||
}
|
||||
|
||||
const _onRemovePress = async () => {
|
||||
const _onConfirm = () => {
|
||||
_deleteMediaItem(item._id)
|
||||
}
|
||||
Alert.alert(
|
||||
intl.formatMessage({id:'alert.delete'}),
|
||||
intl.formatMessage({id:'alert.remove_alert'}),
|
||||
[{
|
||||
text:intl.formatMessage({id:'alert.cancel'}),
|
||||
style:'cancel'
|
||||
},{
|
||||
text:intl.formatMessage({id:'alert.confirm'}),
|
||||
onPress:_onConfirm
|
||||
}]
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
const thumbUrl = proxifyImageSrc(item.url, 600, 500, Platform.OS === 'ios' ? 'match' : 'webp');
|
||||
|
||||
|
@ -336,8 +336,7 @@
|
||||
"title":"Uploaded Images",
|
||||
"title_remove_confirmation":"Delete image",
|
||||
"btn_add":"Image",
|
||||
"message_failed":"Failed to upload image",
|
||||
"message_remove_confirmation":"Are you sure you want to delete this image?"
|
||||
"message_failed":"Failed to upload image"
|
||||
},
|
||||
"pincode": {
|
||||
"enter_text": "Enter PIN to unlock",
|
||||
|
@ -621,7 +621,10 @@ class ApplicationContainer extends Component {
|
||||
_getSettings = async () => {
|
||||
const { dispatch } = this.props;
|
||||
|
||||
//reset certain properties
|
||||
dispatch(hideActionModal());
|
||||
dispatch(toastNotification(''));
|
||||
|
||||
const settings = await getSettings();
|
||||
|
||||
if (settings) {
|
||||
|
@ -594,6 +594,11 @@ class EditorContainer extends Component {
|
||||
_saveCurrentDraft = async (fields) => {
|
||||
const { draftId, isReply, isEdit, isPostSending } = this.state;
|
||||
|
||||
//skip draft save in case post is sending or is post beign edited
|
||||
if (isPostSending || isEdit) {
|
||||
return;
|
||||
}
|
||||
|
||||
const { currentAccount } = this.props;
|
||||
const username = currentAccount && currentAccount.name ? currentAccount.name : '';
|
||||
|
||||
@ -602,7 +607,6 @@ class EditorContainer extends Component {
|
||||
tags: fields.tags && fields.tags.length > 0 ? fields.tags.toString() : '',
|
||||
};
|
||||
|
||||
if (!isPostSending) {
|
||||
//save reply data
|
||||
if (isReply && draftField.body !== null) {
|
||||
await AsyncStorage.setItem('temp-reply', draftField.body);
|
||||
@ -616,7 +620,6 @@ class EditorContainer extends Component {
|
||||
else if (!isReply) {
|
||||
setDraftPost(draftField, username);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
_submitPost = async (fields, scheduleDate) => {
|
||||
|
@ -66,8 +66,8 @@ class EditorScreen extends Component {
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
const { isReply } = this.props;
|
||||
if (!isReply) {
|
||||
const { isReply, isEdit } = this.props;
|
||||
if (!isReply && !isEdit) {
|
||||
this._saveDraftToDB();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user