修复问题
This commit is contained in:
parent
9089e96856
commit
003c7f9e12
@ -27,12 +27,14 @@ import com.yunbao.common.custom.MyRadioButton;
|
||||
import com.yunbao.common.glide.ImgLoader;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.Bus;
|
||||
import com.yunbao.common.utils.GiftCacheUtil;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
import com.yunbao.live.R;
|
||||
import com.yunbao.live.custom.GiftMarkView;
|
||||
import com.yunbao.live.dialog.SendRendPacketPopup;
|
||||
import com.yunbao.live.event.LiveGiftDialogEvent;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
@ -244,8 +246,9 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
|
||||
ViewClicksAntiShake.clicksAntiShake(mRadioButton, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||
@Override
|
||||
public void onViewClicks() {
|
||||
Bus.get().post(new LiveGiftDialogEvent());
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new SendRendPacketPopup(mContext,mLiveUid ))
|
||||
.asCustom(new SendRendPacketPopup(mContext, mLiveUid))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
|
@ -41,7 +41,6 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.lxj.xpopup.XPopup;
|
||||
import com.opensource.svgaplayer.SVGACallback;
|
||||
import com.opensource.svgaplayer.SVGADrawable;
|
||||
import com.opensource.svgaplayer.SVGAImageView;
|
||||
@ -81,6 +80,7 @@ import com.yunbao.live.bean.GiftTopBean;
|
||||
import com.yunbao.live.bean.LiveGuardInfo;
|
||||
import com.yunbao.live.custom.GiftViewPager;
|
||||
import com.yunbao.live.event.LiveAudienceEvent;
|
||||
import com.yunbao.live.event.LiveGiftDialogEvent;
|
||||
import com.yunbao.live.http.LiveHttpConsts;
|
||||
import com.yunbao.live.http.LiveHttpUtil;
|
||||
import com.yunbao.live.utils.ToolsButton;
|
||||
@ -532,7 +532,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
}
|
||||
mGiftList = list;
|
||||
mLiveGiftPagerAdapter = new LiveGiftPagerAdapter(mContext, list,mLiveUid);
|
||||
mLiveGiftPagerAdapter = new LiveGiftPagerAdapter(mContext, list, mLiveUid);
|
||||
mLiveGiftPagerAdapter.setActionListener(this);
|
||||
|
||||
mViewPager.setAdapter(mLiveGiftPagerAdapter);
|
||||
@ -570,7 +570,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
|
||||
private void showWrapList(List<LiveGiftBean> list) {
|
||||
mWrapList = list;
|
||||
mLiveWrapPagerAdapter = new LiveGiftPagerAdapter(mContext, list,mLiveUid);
|
||||
mLiveWrapPagerAdapter = new LiveGiftPagerAdapter(mContext, list, mLiveUid);
|
||||
mLiveWrapPagerAdapter.setActionListener(this);
|
||||
mVPWrapList.setAdapter(mLiveWrapPagerAdapter);
|
||||
LayoutInflater inflater = LayoutInflater.from(mContext);
|
||||
@ -1110,6 +1110,11 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLiveGiftDialogEvent(LiveGiftDialogEvent event) {
|
||||
dismiss();
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onSendBlindGiftEvent(SendBlindGiftEvent event) {
|
||||
if (!TextUtils.equals(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()), event.getUid()))
|
||||
|
@ -24,6 +24,7 @@ import com.yunbao.common.http.live.LiveNetManager;
|
||||
import com.yunbao.common.interfaces.CommonCallback;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
import com.yunbao.common.utils.TimeUtils;
|
||||
import com.yunbao.common.utils.ToastUtil;
|
||||
import com.yunbao.common.views.weight.CircleProgress;
|
||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||
@ -165,13 +166,8 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
dismiss();
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new ResultRendPacketPopup(getContext(),
|
||||
true,
|
||||
null,
|
||||
isSuperJackpot))
|
||||
.show();
|
||||
ToastUtil.show(error);
|
||||
|
||||
}
|
||||
});
|
||||
} else {
|
||||
@ -193,7 +189,7 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new ResultRendPacketPopup(getContext(),
|
||||
true,
|
||||
null,
|
||||
data.setRedPacketId(redPacketId),
|
||||
isSuperJackpot))
|
||||
.show();
|
||||
}
|
||||
@ -202,13 +198,7 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
||||
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
dismiss();
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new ResultRendPacketPopup(getContext(),
|
||||
true,
|
||||
null,
|
||||
isSuperJackpot))
|
||||
.show();
|
||||
ToastUtil.show(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -101,13 +101,13 @@ public class ResultRendPacketPopup extends CenterPopupView {
|
||||
new HttpCallback<List<RedPacketGiftModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<RedPacketGiftModel> data) {
|
||||
if (data.size() > 0) {
|
||||
// if (data.size() > 0) {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new LuckUserRedPacketPopup(getContext(), data))
|
||||
.show();
|
||||
} else {
|
||||
ToastUtil.show(R.string.no_data);
|
||||
}
|
||||
// } else {
|
||||
// ToastUtil.show(R.string.no_data);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -122,13 +122,13 @@ public class ResultRendPacketPopup extends CenterPopupView {
|
||||
new HttpCallback<List<RedPacketGiftModel>>() {
|
||||
@Override
|
||||
public void onSuccess(List<RedPacketGiftModel> data) {
|
||||
if (data.size()>0){
|
||||
// if (data.size() > 0) {
|
||||
new XPopup.Builder(getContext())
|
||||
.asCustom(new LuckUserRedPacketPopup(getContext(), data))
|
||||
.show();
|
||||
}else {
|
||||
ToastUtil.show(R.string.no_data);
|
||||
}
|
||||
// } else {
|
||||
// ToastUtil.show(R.string.no_data);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -139,6 +139,8 @@ public class ResultRendPacketPopup extends CenterPopupView {
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
ToastUtil.show(R.string.no_data);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -0,0 +1,4 @@
|
||||
package com.yunbao.live.event;
|
||||
|
||||
public class LiveGiftDialogEvent {
|
||||
}
|
@ -1393,11 +1393,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
} else {
|
||||
timeHandler.removeCallbacks(timeRunnable);
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append(mRedPacketModel.getRedPacketCount())
|
||||
stringBuffer.append(mRedPacketModel.getRedPacketRemain())
|
||||
.append("/")
|
||||
.append(mRedPacketModel.getRedPacketQuantity());
|
||||
redSchedule.setText(stringBuffer.toString());
|
||||
openRedPacket.setText(String.format(mContext.getString(R.string.open_red_packet), mRedPacketModel.getRedPacketRemain() + ""));
|
||||
openRedPacket.setText(String.format(mContext.getString(R.string.open_red_packet), mRedPacketModel.getRedPacketCount() + ""));
|
||||
redPacketCountdown.setVisibility(View.GONE);
|
||||
redPacketQueue.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@ -1450,14 +1450,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
redPacketCountdown.setText(String.format(mContext.getString(R.string.red_packet_countdown), TimeUtils.getTime(redTimeCountdown)));
|
||||
timeHandler.post(timeRunnable);
|
||||
} else {
|
||||
redTimeCountdown = 0;
|
||||
redPacketQueue.setVisibility(View.VISIBLE);
|
||||
redPacketCountdown.setVisibility(View.GONE);
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
stringBuffer.append(mRedPacketModel.getRedPacketCount())
|
||||
stringBuffer.append(mRedPacketModel.getRedPacketRemain())
|
||||
.append("/")
|
||||
.append(mRedPacketModel.getRedPacketQuantity());
|
||||
redSchedule.setText(stringBuffer.toString());
|
||||
openRedPacket.setText(String.format(mContext.getString(R.string.open_red_packet), mRedPacketModel.getRedPacketRemain() + ""));
|
||||
openRedPacket.setText(String.format(mContext.getString(R.string.open_red_packet), mRedPacketModel.getRedPacketCount() + ""));
|
||||
}
|
||||
if (IMLoginManager.get(mContext).getUserInfo().anchorUserType() && mContext instanceof LiveRyAnchorActivity) {
|
||||
anchorTimeHandler.removeCallbacks(anchorTimeRunnable);
|
||||
@ -1482,7 +1483,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
.show();
|
||||
} else if (TextUtils.equals(data.getReceiveStatus(), "1")) {
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new ResultRendPacketPopup(mContext, true, null, false))
|
||||
.asCustom(new ResultRendPacketPopup(mContext, true, data.setRedPacketId(redPacketModel.getRedPacketId()), false))
|
||||
.show();
|
||||
} else {
|
||||
new XPopup.Builder(mContext)
|
||||
@ -1494,9 +1495,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
@Override
|
||||
public void onError(String error) {
|
||||
ToastUtil.show(error);
|
||||
new XPopup.Builder(mContext)
|
||||
.asCustom(new ResultRendPacketPopup(mContext, true, null, false))
|
||||
.show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user