...
|
...
|
@@ -325,7 +325,7 @@ export function globalDeleteFailure(error) { |
|
|
export function deleteGlobal(skn, index) {
|
|
|
return (dispatch, getState) => {
|
|
|
let {app, product} = getState();
|
|
|
let {globalProduct} = product;
|
|
|
let {globalProduct, commonProduct} = product;
|
|
|
|
|
|
if (!skn || globalProduct.isDeleting) {
|
|
|
return;
|
...
|
...
|
@@ -341,10 +341,10 @@ export function deleteGlobal(skn, index) { |
|
|
dispatch(globalDeleteSuccess({productList}));
|
|
|
if (productList.size == 0) {
|
|
|
dispatch(setProductTab('common'));
|
|
|
let show = commonProduct.get('productList').size > 0;
|
|
|
ReactNative.NativeModules.YH_RecorderHelper.setRightEditButtonVisiblity(show);
|
|
|
}
|
|
|
dispatch(setEditedIndex(-1));
|
|
|
let show = productList.size > 0;
|
|
|
ReactNative.NativeModules.YH_RecorderHelper.setRightEditButtonVisiblity(show);
|
|
|
})
|
|
|
.catch(error => {
|
|
|
dispatch(globalDeleteFailure(error));
|
...
|
...
|
|