From 2162645da123e94a56163e7b6d3e90514b102f98 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Tue, 8 Aug 2023 16:12:07 +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 | 19 ++++++++++++++++--- .../common/views/LiveNewWishListPopup.java | 1 - 2 files changed, 16 insertions(+), 4 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 c9d165012..bb7a963c1 100644 --- a/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java +++ b/common/src/main/java/com/yunbao/common/fragment/LiveNewWishListFragment.java @@ -17,7 +17,6 @@ import com.yunbao.common.bean.WishListModel; import com.yunbao.common.bean.WishModel; import com.yunbao.common.bean.WishModel2; import com.yunbao.common.event.LiveNewWishListCloseEvent; -import com.yunbao.common.event.PopupViewDismissEvent; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.utils.Bus; @@ -66,7 +65,7 @@ public class LiveNewWishListFragment extends BaseFragment { ViewClicksAntiShake.clicksAntiShake(tvDone, new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - saveWish( ); + saveWish(); } }); @@ -106,7 +105,21 @@ public class LiveNewWishListFragment extends BaseFragment { liveNewWishAdapter.addData(wishList, type); } - public void saveWish( ) { + public int liveNewWishAdapterWishList() { + List wishList = liveNewWishAdapter.getWishList(); + List wishList2 = new ArrayList<>(); + Gson gson = new Gson(); + for (WishModel model : wishList) { + if (model != null) { + WishModel2 model2 = gson.fromJson(gson.toJson(model), WishModel2.class); + wishList2.add(model2); + } + + } + return wishList2.size(); + } + + public void saveWish() { List wishList = liveNewWishAdapter.getWishList(); List wishList2 = new ArrayList<>(); Gson gson = new Gson(); 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 6ef497509..4ca74750f 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveNewWishListPopup.java @@ -98,7 +98,6 @@ public class LiveNewWishListPopup extends BottomPopupView { private void saveWishDialog(boolean isDismiss) { if (hintCustomPopup != null) return; - hintCustomPopup = new HintCustomPopup( getContext(), getContext().getString(R.string.replacement_reset_confirmed_cancel3),