修复红包出现在联系方式选项里

This commit is contained in:
zlzw 2023-07-06 17:00:02 +08:00
parent 36b85c15f5
commit 3807ff8916

View File

@ -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<LiveGiftBean> 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);