...
|
...
|
@@ -190,6 +190,7 @@ export function deleteOneHistory(skn, index) { |
|
|
return new BrowseService(app.host).deleteHistory(skn, uid, sourcePage)
|
|
|
.then(json => {
|
|
|
let {productList, selectedProductList} = browse;
|
|
|
let selectedProduct = selectedProductList.toJS()[index];
|
|
|
selectedProductList = selectedProductList.delete(index);
|
|
|
let lists = productList.toArray();
|
|
|
let indexInAll = productList.findIndex((item, i) => {
|
...
|
...
|
@@ -198,7 +199,12 @@ export function deleteOneHistory(skn, index) { |
|
|
if (indexInAll != -1) {
|
|
|
productList = productList.delete(indexInAll);
|
|
|
}
|
|
|
if (selectedProductList.size == 0 || selectedProductList.length == 0) {
|
|
|
dispatch(deleteSelectedProducts([selectedProduct]));
|
|
|
}else {
|
|
|
dispatch(historyDeleteSuccess({productList, selectedProductList}));
|
|
|
}
|
|
|
|
|
|
let show = productList.size > 0;
|
|
|
ReactNative.NativeModules.YH_RecorderHelper.setRightClearButtonVisiblity(show);
|
|
|
})
|
...
|
...
|
|