修复问题
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.glide.ImgLoader;
|
||||||
import com.yunbao.common.interfaces.CommonCallback;
|
import com.yunbao.common.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.GiftCacheUtil;
|
import com.yunbao.common.utils.GiftCacheUtil;
|
||||||
import com.yunbao.common.utils.ToastUtil;
|
import com.yunbao.common.utils.ToastUtil;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
import com.yunbao.live.R;
|
import com.yunbao.live.R;
|
||||||
import com.yunbao.live.custom.GiftMarkView;
|
import com.yunbao.live.custom.GiftMarkView;
|
||||||
import com.yunbao.live.dialog.SendRendPacketPopup;
|
import com.yunbao.live.dialog.SendRendPacketPopup;
|
||||||
|
import com.yunbao.live.event.LiveGiftDialogEvent;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -244,6 +246,7 @@ public class LiveGiftAdapter extends RecyclerView.Adapter<LiveGiftAdapter.Vh> {
|
|||||||
ViewClicksAntiShake.clicksAntiShake(mRadioButton, new ViewClicksAntiShake.ViewClicksCallBack() {
|
ViewClicksAntiShake.clicksAntiShake(mRadioButton, new ViewClicksAntiShake.ViewClicksCallBack() {
|
||||||
@Override
|
@Override
|
||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
|
Bus.get().post(new LiveGiftDialogEvent());
|
||||||
new XPopup.Builder(mContext)
|
new XPopup.Builder(mContext)
|
||||||
.asCustom(new SendRendPacketPopup(mContext, mLiveUid))
|
.asCustom(new SendRendPacketPopup(mContext, mLiveUid))
|
||||||
.show();
|
.show();
|
||||||
|
@ -41,7 +41,6 @@ import com.alibaba.android.arouter.launcher.ARouter;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.lxj.xpopup.XPopup;
|
|
||||||
import com.opensource.svgaplayer.SVGACallback;
|
import com.opensource.svgaplayer.SVGACallback;
|
||||||
import com.opensource.svgaplayer.SVGADrawable;
|
import com.opensource.svgaplayer.SVGADrawable;
|
||||||
import com.opensource.svgaplayer.SVGAImageView;
|
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.bean.LiveGuardInfo;
|
||||||
import com.yunbao.live.custom.GiftViewPager;
|
import com.yunbao.live.custom.GiftViewPager;
|
||||||
import com.yunbao.live.event.LiveAudienceEvent;
|
import com.yunbao.live.event.LiveAudienceEvent;
|
||||||
|
import com.yunbao.live.event.LiveGiftDialogEvent;
|
||||||
import com.yunbao.live.http.LiveHttpConsts;
|
import com.yunbao.live.http.LiveHttpConsts;
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
import com.yunbao.live.utils.ToolsButton;
|
import com.yunbao.live.utils.ToolsButton;
|
||||||
@ -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)
|
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||||
public void onSendBlindGiftEvent(SendBlindGiftEvent event) {
|
public void onSendBlindGiftEvent(SendBlindGiftEvent event) {
|
||||||
if (!TextUtils.equals(String.valueOf(IMLoginManager.get(mContext).getUserInfo().getId()), event.getUid()))
|
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.interfaces.CommonCallback;
|
||||||
import com.yunbao.common.manager.IMLoginManager;
|
import com.yunbao.common.manager.IMLoginManager;
|
||||||
import com.yunbao.common.utils.TimeUtils;
|
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.CircleProgress;
|
||||||
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
import com.yunbao.common.views.weight.ClipPathCircleImage;
|
||||||
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
import com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
@ -165,13 +166,8 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
dismiss();
|
ToastUtil.show(error);
|
||||||
new XPopup.Builder(getContext())
|
|
||||||
.asCustom(new ResultRendPacketPopup(getContext(),
|
|
||||||
true,
|
|
||||||
null,
|
|
||||||
isSuperJackpot))
|
|
||||||
.show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -193,7 +189,7 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
|||||||
new XPopup.Builder(getContext())
|
new XPopup.Builder(getContext())
|
||||||
.asCustom(new ResultRendPacketPopup(getContext(),
|
.asCustom(new ResultRendPacketPopup(getContext(),
|
||||||
true,
|
true,
|
||||||
null,
|
data.setRedPacketId(redPacketId),
|
||||||
isSuperJackpot))
|
isSuperJackpot))
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
@ -202,13 +198,7 @@ public class ReceiveRendPacketPopup extends CenterPopupView {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
dismiss();
|
ToastUtil.show(error);
|
||||||
new XPopup.Builder(getContext())
|
|
||||||
.asCustom(new ResultRendPacketPopup(getContext(),
|
|
||||||
true,
|
|
||||||
null,
|
|
||||||
isSuperJackpot))
|
|
||||||
.show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -101,13 +101,13 @@ public class ResultRendPacketPopup extends CenterPopupView {
|
|||||||
new HttpCallback<List<RedPacketGiftModel>>() {
|
new HttpCallback<List<RedPacketGiftModel>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<RedPacketGiftModel> data) {
|
public void onSuccess(List<RedPacketGiftModel> data) {
|
||||||
if (data.size() > 0) {
|
// if (data.size() > 0) {
|
||||||
new XPopup.Builder(getContext())
|
new XPopup.Builder(getContext())
|
||||||
.asCustom(new LuckUserRedPacketPopup(getContext(), data))
|
.asCustom(new LuckUserRedPacketPopup(getContext(), data))
|
||||||
.show();
|
.show();
|
||||||
} else {
|
// } else {
|
||||||
ToastUtil.show(R.string.no_data);
|
// ToastUtil.show(R.string.no_data);
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,13 +122,13 @@ public class ResultRendPacketPopup extends CenterPopupView {
|
|||||||
new HttpCallback<List<RedPacketGiftModel>>() {
|
new HttpCallback<List<RedPacketGiftModel>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(List<RedPacketGiftModel> data) {
|
public void onSuccess(List<RedPacketGiftModel> data) {
|
||||||
if (data.size()>0){
|
// if (data.size() > 0) {
|
||||||
new XPopup.Builder(getContext())
|
new XPopup.Builder(getContext())
|
||||||
.asCustom(new LuckUserRedPacketPopup(getContext(), data))
|
.asCustom(new LuckUserRedPacketPopup(getContext(), data))
|
||||||
.show();
|
.show();
|
||||||
}else {
|
// } else {
|
||||||
ToastUtil.show(R.string.no_data);
|
// 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 {
|
} else {
|
||||||
timeHandler.removeCallbacks(timeRunnable);
|
timeHandler.removeCallbacks(timeRunnable);
|
||||||
StringBuffer stringBuffer = new StringBuffer();
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
stringBuffer.append(mRedPacketModel.getRedPacketCount())
|
stringBuffer.append(mRedPacketModel.getRedPacketRemain())
|
||||||
.append("/")
|
.append("/")
|
||||||
.append(mRedPacketModel.getRedPacketQuantity());
|
.append(mRedPacketModel.getRedPacketQuantity());
|
||||||
redSchedule.setText(stringBuffer.toString());
|
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);
|
redPacketCountdown.setVisibility(View.GONE);
|
||||||
redPacketQueue.setVisibility(View.VISIBLE);
|
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)));
|
redPacketCountdown.setText(String.format(mContext.getString(R.string.red_packet_countdown), TimeUtils.getTime(redTimeCountdown)));
|
||||||
timeHandler.post(timeRunnable);
|
timeHandler.post(timeRunnable);
|
||||||
} else {
|
} else {
|
||||||
|
redTimeCountdown = 0;
|
||||||
redPacketQueue.setVisibility(View.VISIBLE);
|
redPacketQueue.setVisibility(View.VISIBLE);
|
||||||
redPacketCountdown.setVisibility(View.GONE);
|
redPacketCountdown.setVisibility(View.GONE);
|
||||||
StringBuffer stringBuffer = new StringBuffer();
|
StringBuffer stringBuffer = new StringBuffer();
|
||||||
stringBuffer.append(mRedPacketModel.getRedPacketCount())
|
stringBuffer.append(mRedPacketModel.getRedPacketRemain())
|
||||||
.append("/")
|
.append("/")
|
||||||
.append(mRedPacketModel.getRedPacketQuantity());
|
.append(mRedPacketModel.getRedPacketQuantity());
|
||||||
redSchedule.setText(stringBuffer.toString());
|
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) {
|
if (IMLoginManager.get(mContext).getUserInfo().anchorUserType() && mContext instanceof LiveRyAnchorActivity) {
|
||||||
anchorTimeHandler.removeCallbacks(anchorTimeRunnable);
|
anchorTimeHandler.removeCallbacks(anchorTimeRunnable);
|
||||||
@ -1482,7 +1483,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
.show();
|
.show();
|
||||||
} else if (TextUtils.equals(data.getReceiveStatus(), "1")) {
|
} else if (TextUtils.equals(data.getReceiveStatus(), "1")) {
|
||||||
new XPopup.Builder(mContext)
|
new XPopup.Builder(mContext)
|
||||||
.asCustom(new ResultRendPacketPopup(mContext, true, null, false))
|
.asCustom(new ResultRendPacketPopup(mContext, true, data.setRedPacketId(redPacketModel.getRedPacketId()), false))
|
||||||
.show();
|
.show();
|
||||||
} else {
|
} else {
|
||||||
new XPopup.Builder(mContext)
|
new XPopup.Builder(mContext)
|
||||||
@ -1494,9 +1495,6 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
@Override
|
@Override
|
||||||
public void onError(String error) {
|
public void onError(String error) {
|
||||||
ToastUtil.show(error);
|
ToastUtil.show(error);
|
||||||
new XPopup.Builder(mContext)
|
|
||||||
.asCustom(new ResultRendPacketPopup(mContext, true, null, false))
|
|
||||||
.show();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user