mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-24 22:03:21 +03:00
removed draft save during editing..
This commit is contained in:
parent
707502f8e1
commit
dbab8c2777
@ -227,11 +227,13 @@ export const QuickReplyModalContent = forwardRef(({
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const _deboucedCacheUpdate = useCallback(debounce(_addQuickCommentIntoCache, 500), [])
|
//REMOVED FOR TESTING, CAN BE PUT BACK IF APP STILL CRASHES
|
||||||
|
// const _deboucedCacheUpdate = useCallback(debounce(_addQuickCommentIntoCache, 500), [])
|
||||||
|
|
||||||
const _onChangeText = (value) => {
|
const _onChangeText = (value) => {
|
||||||
setCommentValue(value);
|
setCommentValue(value);
|
||||||
_deboucedCacheUpdate(value)
|
//REMOVED FOR TESTING, CAN BE PUT BACK IF APP STILL CRASHES
|
||||||
|
// _deboucedCacheUpdate(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -174,6 +174,8 @@ export default function (state = initialState, action) {
|
|||||||
state.drafts.delete(entry[0]);
|
state.drafts.delete(entry[0]);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.subscribedCommunities && state.subscribedCommunities.size) {
|
if (state.subscribedCommunities && state.subscribedCommunities.size) {
|
||||||
|
@ -571,6 +571,9 @@ class EditorContainer extends Component<any, any> {
|
|||||||
const { isDraftSaved, draftId, thumbIndex, isReply, rewardType } = this.state;
|
const { isDraftSaved, draftId, thumbIndex, isReply, rewardType } = this.state;
|
||||||
const { currentAccount, dispatch, intl } = this.props;
|
const { currentAccount, dispatch, intl } = this.props;
|
||||||
|
|
||||||
|
//Saves draft locally for both reply and post
|
||||||
|
this._saveCurrentDraft(fields)
|
||||||
|
|
||||||
if (isReply) {
|
if (isReply) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -667,8 +670,10 @@ class EditorContainer extends Component<any, any> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_saveCurrentDraft = async (fields) => {
|
_saveCurrentDraft = async (fields) => {
|
||||||
const { draftId, isReply, isEdit, isPostSending, thumbIndex, rewardType, scheduleDate } = this.state;
|
const { draftId, isReply, isEdit, isPostSending } = this.state;
|
||||||
|
|
||||||
//skip draft save in case post is sending or is post beign edited
|
//skip draft save in case post is sending or is post beign edited
|
||||||
if (isPostSending || isEdit) {
|
if (isPostSending || isEdit) {
|
||||||
@ -701,6 +706,10 @@ class EditorContainer extends Component<any, any> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_submitPost = async ({ fields, scheduleDate }: { fields: any, scheduleDate?: string }) => {
|
_submitPost = async ({ fields, scheduleDate }: { fields: any, scheduleDate?: string }) => {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -276,7 +276,8 @@ class EditorScreen extends Component {
|
|||||||
) {
|
) {
|
||||||
console.log('jsonMeta : ', jsonMeta);
|
console.log('jsonMeta : ', jsonMeta);
|
||||||
handleFormChanged();
|
handleFormChanged();
|
||||||
this._saveCurrentDraft(fields);
|
//TODO: REMOVED FOR TESTING, CAN BE PUT BACK IF APP STILL CRASHES
|
||||||
|
// this._saveCurrentDraft(fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setState({ fields }, () => {
|
this.setState({ fields }, () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user