Authored by 盖剑秋

Fix bug YH-3208. reviewed by redding.

... ... @@ -442,7 +442,8 @@ export function commentWithParams(sid,params, newList) {
.then(response => {
dispatch(updateCommentProgress(sid,response, params, newList));
}).catch(error => {
dispatch(commentFail(sid,error));
newList.pop();
dispatch(commentFail(sid,newList,error));
});
}
} else {
... ... @@ -468,7 +469,8 @@ export function commitComment(sid,params, newList) {
dispatch(commentSuccess(sid,response, newList));
}).catch(error => {
Alert.alert('提示','回复失败');
dispatch(commentFail(sid,error));
newList.pop();
dispatch(commentFail(sid,newList,error));
});
}
}
... ... @@ -515,9 +517,9 @@ export function commentSuccess(sid,json, newList) {
}
}
export function commentFail (sid,error) {
export function commentFail (sid,newList,error) {
return {
type: SUBJECT_REPLY_FAILURE,
payload: {sid,error},
payload: {sid,newList,error},
}
}
... ...