Merge pull request #289 from Benaiah/confirm-navigation-while-changes-unsaved
Don't ask for navigation confirmation on save
This commit is contained in:
@ -70,11 +70,16 @@ const entryDraftReducer = (state = Map(), action) => {
|
|||||||
|
|
||||||
case ENTRY_PERSIST_SUCCESS:
|
case ENTRY_PERSIST_SUCCESS:
|
||||||
case ENTRY_PERSIST_FAILURE:
|
case ENTRY_PERSIST_FAILURE:
|
||||||
case UNPUBLISHED_ENTRY_PERSIST_SUCCESS:
|
|
||||||
case UNPUBLISHED_ENTRY_PERSIST_FAILURE: {
|
case UNPUBLISHED_ENTRY_PERSIST_FAILURE: {
|
||||||
return state.deleteIn(['entry', 'isPersisting']);
|
return state.deleteIn(['entry', 'isPersisting']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case UNPUBLISHED_ENTRY_PERSIST_SUCCESS:
|
||||||
|
return state.withMutations((state) => {
|
||||||
|
state.deleteIn(['entry', 'isPersisting']);
|
||||||
|
state.setIn(['entry', 'hasChanged'], false);
|
||||||
|
});
|
||||||
|
|
||||||
case ADD_ASSET:
|
case ADD_ASSET:
|
||||||
return state.update('mediaFiles', list => list.push(action.payload.public_path));
|
return state.update('mediaFiles', list => list.push(action.payload.public_path));
|
||||||
case REMOVE_ASSET:
|
case REMOVE_ASSET:
|
||||||
|
Reference in New Issue
Block a user