Authored by 盖剑秋

Fix UI bug on collection goods. reviewed by redding.

@@ -325,7 +325,7 @@ export function globalDeleteFailure(error) { @@ -325,7 +325,7 @@ export function globalDeleteFailure(error) {
325 export function deleteGlobal(skn, index) { 325 export function deleteGlobal(skn, index) {
326 return (dispatch, getState) => { 326 return (dispatch, getState) => {
327 let {app, product} = getState(); 327 let {app, product} = getState();
328 - let {globalProduct} = product; 328 + let {globalProduct, commonProduct} = product;
329 329
330 if (!skn || globalProduct.isDeleting) { 330 if (!skn || globalProduct.isDeleting) {
331 return; 331 return;
@@ -341,10 +341,10 @@ export function deleteGlobal(skn, index) { @@ -341,10 +341,10 @@ export function deleteGlobal(skn, index) {
341 dispatch(globalDeleteSuccess({productList})); 341 dispatch(globalDeleteSuccess({productList}));
342 if (productList.size == 0) { 342 if (productList.size == 0) {
343 dispatch(setProductTab('common')); 343 dispatch(setProductTab('common'));
  344 + let show = commonProduct.get('productList').size > 0;
  345 + ReactNative.NativeModules.YH_RecorderHelper.setRightEditButtonVisiblity(show);
344 } 346 }
345 dispatch(setEditedIndex(-1)); 347 dispatch(setEditedIndex(-1));
346 - let show = productList.size > 0;  
347 - ReactNative.NativeModules.YH_RecorderHelper.setRightEditButtonVisiblity(show);  
348 }) 348 })
349 .catch(error => { 349 .catch(error => {
350 dispatch(globalDeleteFailure(error)); 350 dispatch(globalDeleteFailure(error));