From 20c00e28962bf64a300e6b2fcb87467c9605fe5c Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 8 Aug 2023 15:37:11 +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 | 45 ++++++++++++------- 1 file changed, 29 insertions(+), 16 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 d2e73a5c7..fa77435bb 100644 --- a/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java +++ b/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java @@ -117,9 +117,35 @@ public class LiveNewWishListFragment extends BaseFragment { } } + switch (type) { + case 1: + Bus.get().post(new LiveNewWishListCloseEvent().setDayWish(false)); + break; + case 2: + Bus.get().post(new LiveNewWishListCloseEvent().setZhouXin(false)); + break; + case 3: + Bus.get().post(new LiveNewWishListCloseEvent().setLunarWish(false)); + break; + case 4: + Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(false)); + 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("修改成功"); + } + @Override + public void onError(String error) { + ToastUtil.show(R.string.net_error); + } + }); } else if (wishList2.size() == 1) { new XPopup.Builder(getContext()) .asCustom(new HintCustomPopup(getContext(), @@ -140,6 +166,7 @@ public class LiveNewWishListFragment extends BaseFragment { @Override public void onSuccess(String data) { Bus.get().post(new PopupViewDismissEvent()); + ToastUtil.show("修改成功"); } @Override @@ -164,7 +191,8 @@ 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("修改成功"); } @Override @@ -174,20 +202,5 @@ public class LiveNewWishListFragment extends BaseFragment { }); } - - switch (type) { - case 1: - Bus.get().post(new LiveNewWishListCloseEvent().setDayWish(false)); - break; - case 2: - Bus.get().post(new LiveNewWishListCloseEvent().setZhouXin(false)); - break; - case 3: - Bus.get().post(new LiveNewWishListCloseEvent().setLunarWish(false)); - break; - case 4: - Bus.get().post(new LiveNewWishListCloseEvent().setSeasonalWish(false)); - break; - } } }