diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java b/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java index c832dbf84..3a891c34e 100644 --- a/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/GiftPopDialog.java @@ -66,7 +66,7 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene private String title; private TextView mTitle; private boolean isOldGiftList = false; - private boolean hideGiftType=false; + private boolean hideGiftType = false; public GiftPopDialog(@NonNull Context context) { @@ -134,7 +134,7 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene if (!StringUtil.isEmpty(title)) { mTitle.setText(title); } - if(hideGiftType){ + if (hideGiftType) { findViewById(R.id.gift_tab_layout).setVisibility(GONE); } } @@ -227,7 +227,7 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene } giftTopAdapter.setList(name); - if(isOldGiftList){ + if (isOldGiftList) { showGiftList(JSON.parseArray(list.toJSONString(), LiveGiftBean.class)); return; } @@ -238,7 +238,13 @@ public class GiftPopDialog extends AbsDialogPopupWindow implements ActionListene } private void showGiftList(List list) { - mLiveGiftPagerAdapter = new LiveGiftPagerAdapter(mContext, list,""); + for (LiveGiftBean giftBean : list) { + if (giftBean.getType() == 9999999) { + list.remove(giftBean); + break; + } + } + mLiveGiftPagerAdapter = new LiveGiftPagerAdapter(mContext, list, ""); mLiveGiftPagerAdapter.setActionListener(this); mViewPager.setAdapter(mLiveGiftPagerAdapter);