1.添加背包礼物交友功能

This commit is contained in:
2025-09-16 00:56:58 +08:00
parent e87a368862
commit 72802ef7be
26 changed files with 321 additions and 120 deletions

View File

@@ -12,6 +12,7 @@ import com.xscm.moduleutil.R;
import com.xscm.moduleutil.base.BaseMvpFragment;
import com.xscm.moduleutil.bean.GiftLabelBean;
import com.xscm.moduleutil.bean.GiftPackBean;
import com.xscm.moduleutil.bean.GiftPackListCount;
import com.xscm.moduleutil.bean.RewardUserBean;
import com.xscm.moduleutil.bean.RoonGiftModel;
import com.xscm.moduleutil.bean.WalletBean;
@@ -84,8 +85,8 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
if (type == 0) {
MvpPre.getGiftList("0", type, roomId);
} else {
if (id==null){
id="0";
if (id == null) {
id = "0";
}
MvpPre.getGiftList(id, type, roomId);
}
@@ -94,23 +95,23 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onString(String giftId){
bdgiftId=giftId;
public void onString(String giftId) {
bdgiftId = giftId;
MvpPre.giftPack();
}
@Override
protected void initData() {
if (id.equals("0")) {
MvpPre.giftPack();
} else {
if (type == 0) {
MvpPre.getGiftList("0", type, roomId);
} else {
MvpPre.getGiftList(id, type, roomId);
}
}
// if (id.equals("0")) {
// MvpPre.giftPack();
// } else {
// if (type == 0) {
// MvpPre.getGiftList("0", type, roomId);
// } else {
// MvpPre.getGiftList(id, type, roomId);
// }
//
// }
}
@Override
@@ -183,23 +184,33 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
@Override
public void giftPack(List<GiftPackBean> giftPackBean) {
giftPackList = new ArrayList<>();
if (bdgiftId!=null){
for (GiftPackBean item : giftPackBean){
if (item.getGift_id().equals(bdgiftId)){
item.setChecked(true);
if (giftPackBean != null && giftPackBean.size() > 0) {
if (bdgiftId != null) {
for (GiftPackBean item : giftPackBean) {
if (item.getGift_id().equals(bdgiftId)) {
item.setChecked(true);
}
}
}
}
giftPackList.addAll(giftPackBean);
pageCount = (int) Math.ceil(giftPackBean.size() * 1.0 / pageSize);
for (int j = 0; j < pageCount; j++) {
giftPackList.addAll(giftPackBean);
pageCount = (int) Math.ceil(giftPackBean.size() * 1.0 / pageSize);
for (int j = 0; j < pageCount; j++) {
// mAdapter = new GiftTwoAdapter(getActivity(), data, j, "0");
// mBinding.rvGift.setAdapter(mAdapter);
packAdapter = new GiftPackAdapter(getActivity(), giftPackBean, j, "0");
packAdapter = new GiftPackAdapter(getActivity(), giftPackBean, j, "0");
mBinding.rvGift.setAdapter(packAdapter);
}
} else {
giftPackBean = new ArrayList<>();
pageCount = (int) Math.ceil(giftPackBean.size() * 1.0 / pageSize);
packAdapter = new GiftPackAdapter(getActivity(), giftPackBean, 0, "0");
mBinding.rvGift.setAdapter(packAdapter);
}
}
@Override
@@ -207,6 +218,11 @@ public class GiftTwoDetailsFragment extends BaseMvpFragment<RewardGiftPresenter,
}
@Override
public void getGiftPackListCount(GiftPackListCount giftPackListCount) {
}
@Override
public void getRewardList(List<RewardUserBean> rewardUserBeanList) {