From af17c85366497b0fbb4a5301a45da2e55c898856 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 8 Aug 2023 16:08:43 +0800 Subject: [PATCH] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fragment/LiveNewWishListFragment.java | 23 ++++++++----------- .../common/views/LiveNewWishListPopup.java | 12 ++++------ 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java b/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java index fa77435bb..c9d165012 100644 --- a/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java +++ b/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java @@ -66,7 +66,7 @@ public class LiveNewWishListFragment extends BaseFragment { ViewClicksAntiShake.clicksAntiShake(tvDone, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - saveWish(); + saveWish( ); } }); @@ -106,7 +106,7 @@ public class LiveNewWishListFragment extends BaseFragment { liveNewWishAdapter.addData(wishList, type); } - public void saveWish() { + public void saveWish( ) { List wishList = liveNewWishAdapter.getWishList(); List wishList2 = new ArrayList<>(); Gson gson = new Gson(); @@ -132,12 +132,10 @@ public class LiveNewWishListFragment extends BaseFragment { break; } if (wishList2.size() == 0) { - Bus.get().post(new PopupViewDismissEvent()); LiveNetManager.get(getContext()). setWishlistV2(type, gson.toJson(wishList2), new HttpCallback() { @Override public void onSuccess(String data) { - Bus.get().post(new PopupViewDismissEvent()); ToastUtil.show("修改成功"); } @@ -151,12 +149,17 @@ public class LiveNewWishListFragment extends BaseFragment { .asCustom(new HintCustomPopup(getContext(), getContext().getString(R.string.dialog_tip), getContext().getString(R.string.sett_rigger)) - .setLiveOpenOk(getContext().getString(R.string.cancel_ca)) - .setLiveOpenCancel(getContext().getString(R.string.settings_ser)) + .setLiveOpenOk(getContext().getString(R.string.settings_ser)) + .setLiveOpenCancel(getContext().getString(R.string.cancel_ca)) .setCallBack(new HintCustomPopup.HintCustomCallBack() { @Override public void onSure() { + } + + @Override + public void onCancel() { + if (wishList2.size() > 10) { ToastUtil.show(R.string.must_hint); return; @@ -165,7 +168,6 @@ public class LiveNewWishListFragment extends BaseFragment { setWishlistV2(type, gson.toJson(wishList2), new HttpCallback() { @Override public void onSuccess(String data) { - Bus.get().post(new PopupViewDismissEvent()); ToastUtil.show("修改成功"); } @@ -175,14 +177,8 @@ public class LiveNewWishListFragment extends BaseFragment { } }); } - - @Override - public void onCancel() { - - } })).show(); } else { - Bus.get().post(new PopupViewDismissEvent()); if (wishList2.size() > 10) { ToastUtil.show(R.string.must_hint); return; @@ -191,7 +187,6 @@ public class LiveNewWishListFragment extends BaseFragment { setWishlistV2(type, gson.toJson(wishList2), new HttpCallback() { @Override public void onSuccess(String data) { - Bus.get().post(new PopupViewDismissEvent()); ToastUtil.show("修改成功"); } diff --git a/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java b/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java index b909dade7..6ef497509 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java @@ -110,17 +110,15 @@ public class LiveNewWishListPopup extends BottomPopupView { public void onSure() { hintCustomPopup = null; if (dayWish) { - dayWishFragment.saveWish(); + dayWishFragment.saveWish( ); } else if (zhouXin) { - zhouXinFragment.saveWish(); + zhouXinFragment.saveWish( ); } else if (lunarWish) { - lunarWishFragment.saveWish(); + lunarWishFragment.saveWish( ); } else if (seasonalWish) { - seasonalWishFragment.saveWish(); - } - if (isDismiss) { - dismiss(); + seasonalWishFragment.saveWish( ); } + } @Override