...
|
...
|
@@ -144,7 +144,7 @@ export function historyList(category_id) { |
|
|
} else if (newproductList.length){
|
|
|
productList = newproductList;
|
|
|
}
|
|
|
|
|
|
|
|
|
dispatch(historyListSuccess({currentPage, page_total, productList}));
|
|
|
let show = productList.length > 0;
|
|
|
ReactNative.NativeModules.YH_RecorderHelper.setRightClearButtonVisiblity(show);
|
...
|
...
|
@@ -217,11 +217,11 @@ export function deleteOneHistory(skn, index) { |
|
|
if (indexInAll != -1) {
|
|
|
productList = productList.delete(indexInAll);
|
|
|
}
|
|
|
if (productList.size == 0 || productList.length == 0) {
|
|
|
dispatch(historySortList());
|
|
|
}else {
|
|
|
// if (productList.size == 0 || productList.length == 0) {
|
|
|
// dispatch(historySortList());
|
|
|
// }else {
|
|
|
dispatch(historyDeleteSuccess({productList}));
|
|
|
}
|
|
|
// }
|
|
|
|
|
|
let show = productList.size > 0;
|
|
|
ReactNative.NativeModules.YH_RecorderHelper.setRightClearButtonVisiblity(show);
|
...
|
...
|
@@ -256,10 +256,9 @@ export function historyClearRequest() { |
|
|
};
|
|
|
}
|
|
|
|
|
|
export function historyClearSuccess(json) {
|
|
|
export function historyClearSuccess() {
|
|
|
return {
|
|
|
type: HISTORY_CLEAR_SUCCESS,
|
|
|
payload:json
|
|
|
};
|
|
|
}
|
|
|
|
...
|
...
|
@@ -287,9 +286,9 @@ export function clearHistory(selectedProducts) { |
|
|
dispatch(historyClearRequest());
|
|
|
return new BrowseService(app.host).deleteHistory(skns, uid, sourcePage)
|
|
|
.then(json => {
|
|
|
dispatch(historySortList());
|
|
|
dispatch(historyList(0));
|
|
|
dispatch({type: HISTORY_CLEAR_SUCCESS});
|
|
|
// dispatch(historySortList());
|
|
|
// dispatch(historyList(0));
|
|
|
dispatch(historyClearSuccess());
|
|
|
})
|
|
|
.catch(error => {
|
|
|
dispatch(historyClearFailure(error));
|
...
|
...
|
@@ -314,4 +313,3 @@ export function clearHistory(selectedProducts) { |
|
|
});
|
|
|
};
|
|
|
} |
|
|
|
...
|
...
|
|