add[轮盘整蛊]
This commit is contained in:
parent
e874c2ee16
commit
45ae3b1624
@ -525,8 +525,9 @@ public interface PDLiveApi {
|
||||
@Query("anchor_id") String anchor_id,
|
||||
@Query("status") String status,
|
||||
@Query("prank_json") String prank_json,
|
||||
@Query("is_cleared") String is_cleared,
|
||||
@Query("prank_type") String prank_type
|
||||
@Query("prank_type") String prank_type,
|
||||
@Query("is_cleared") String is_cleared
|
||||
|
||||
);
|
||||
|
||||
/**
|
||||
|
@ -232,7 +232,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
|
||||
if ((int) mPrankBtn.getTag() == 0) {
|
||||
setPrankConfig();
|
||||
} else {
|
||||
setGiftBean(recyclerAdapter.getList());
|
||||
setGiftBean(recyclerAdapter.getList(),"0");
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -251,7 +251,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
|
||||
mPrankBtn.setVisibility(View.VISIBLE);
|
||||
mBtnAddGift.setVisibility(View.VISIBLE);
|
||||
mGiftNotDate.setVisibility(View.VISIBLE);
|
||||
setGiftBean(recyclerAdapter.getList());
|
||||
setGiftBean(recyclerAdapter.getList(),"1");
|
||||
}
|
||||
ToastUtil.show(WordUtil.isNewZh()?"清空成功!":"Cleared successfully!");
|
||||
}
|
||||
@ -413,9 +413,9 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
|
||||
});
|
||||
}
|
||||
|
||||
private void setGiftBean(List<PrankGiftBean> prankGiftBeans) {
|
||||
private void setGiftBean(List<PrankGiftBean> prankGiftBeans,String is_cleared) {
|
||||
JSONArray prankJson = getJsonObjects(prankGiftBeans);
|
||||
LiveNetManager.get(mContext).setPrankGift(mLiveUid, giftSwitch1Btn.getTag().equals("true") ? "1" : "0", new Gson().toJson(prankJson), giftTypeNowText.getTag().toString(),"", new HttpCallback<PrankHttpTurntableBean>() {
|
||||
LiveNetManager.get(mContext).setPrankGift(mLiveUid, giftSwitch1Btn.getTag().equals("true") ? "1" : "0", new Gson().toJson(prankJson), giftTypeNowText.getTag().toString(),is_cleared, new HttpCallback<PrankHttpTurntableBean>() {
|
||||
@Override
|
||||
public void onSuccess(PrankHttpTurntableBean data) {
|
||||
initGiftData();
|
||||
|
@ -308,29 +308,29 @@ public class SocketRyClient {
|
||||
// LogUtils.e("yqw=====>整蛊礼物列表:"+ctString);
|
||||
JsonObject jsonObject = jsonElement.getAsJsonObject();
|
||||
String content = WordUtil.isNewZh() ? jsonObject.get("msg").getAsString() : jsonObject.get("msg_en").getAsString();
|
||||
|
||||
String is_complete = jsonObject.get("is_complete").getAsString(); //0.未达成整蛊需要的数量 1.已达成整蛊
|
||||
String user_name = jsonObject.get("user_name").getAsString(); //用户昵称
|
||||
String gift_name = WordUtil.isNewZh()?jsonObject.get("gift_name").getAsString():jsonObject.get("gift_name_en").getAsString(); //礼物名称
|
||||
String prank_content = jsonObject.get("prank_content").getAsString(); //整蛊内容
|
||||
String gift_count = jsonObject.get("gift_count").getAsString(); // 礼物数量
|
||||
|
||||
if(is_complete.equals("1")){
|
||||
LiveChatBean chatBean = new LiveChatBean();
|
||||
chatBean.setUserNiceName(user_name);
|
||||
chatBean.setGiftName(gift_name);
|
||||
chatBean.setHot_num(gift_count);
|
||||
chatBean.setContent(prank_content);
|
||||
chatBean.setType(TYPE_TO_ANCHOR_PRANK_GIFT);
|
||||
mListener.onChat(chatBean, 1);
|
||||
if(jsonObject.get("is_complete")!=null){
|
||||
String is_complete = jsonObject.get("is_complete").getAsString(); //0.未达成整蛊需要的数量 1.已达成整蛊
|
||||
String user_name = jsonObject.get("user_name").getAsString(); //用户昵称
|
||||
String gift_name = WordUtil.isNewZh()?jsonObject.get("gift_name").getAsString():jsonObject.get("gift_name_en").getAsString(); //礼物名称
|
||||
String prank_content = jsonObject.get("prank_content").getAsString(); //整蛊内容
|
||||
String gift_count = jsonObject.get("gift_count").getAsString(); // 礼物数量
|
||||
if(is_complete.equals("1")){
|
||||
LiveChatBean chatBean = new LiveChatBean();
|
||||
chatBean.setUserNiceName(user_name);
|
||||
chatBean.setGiftName(gift_name);
|
||||
chatBean.setHot_num(gift_count);
|
||||
chatBean.setContent(prank_content);
|
||||
chatBean.setType(TYPE_TO_ANCHOR_PRANK_GIFT);
|
||||
mListener.onChat(chatBean, 1);
|
||||
}
|
||||
}else{
|
||||
if (!TextUtils.isEmpty(content)){
|
||||
systemChatMessage2(content);
|
||||
}
|
||||
if("完成1次!".equals(jsonObject.get("msg").getAsString())){
|
||||
Toast toast = Toast.makeText(mContext,WordUtil.isNewZh()?jsonObject.get("msg").getAsString():jsonObject.get("msg_en").getAsString(),Toast.LENGTH_LONG);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
if("完成1次!".equals(jsonObject.get("msg").getAsString())){
|
||||
Toast toast = Toast.makeText(mContext,WordUtil.isNewZh()?jsonObject.get("msg").getAsString():jsonObject.get("msg_en").getAsString(),Toast.LENGTH_LONG);
|
||||
toast.show();
|
||||
}
|
||||
mListener.onUpdatePrankProgress(ctString);
|
||||
}
|
||||
|
@ -1775,10 +1775,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
prank_group.setVisibility(View.GONE);
|
||||
prank_small_icon.setVisibility(View.GONE);
|
||||
}
|
||||
if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
|
||||
return;
|
||||
}
|
||||
if (Integer.parseInt(ctString.getString("prank_turntable_status")) == 0){
|
||||
prank_group_turntable_icon.setVisibility(View.GONE);
|
||||
}else {
|
||||
ZeusKt.visible(prank_group_turntable_icon);
|
||||
prank_group_turntable_icon.setVisibility(View.VISIBLE);
|
||||
//ZeusKt.visible(prank_group_turntable_icon);
|
||||
}
|
||||
}else {
|
||||
//送整蛊礼物更新
|
||||
@ -1834,6 +1838,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
private void setPrankList(int status,int mPrankType,int prankTurntableStatus){
|
||||
// LogUtils.e("yqw=====>显示转盘icon:是否显示:"+(prankTurntableStatus == 1)+",是否在倒计时"+(lt_trickery.getVisibility() == View.VISIBLE));
|
||||
if (prankTurntableStatus == 1 && lt_trickery.getVisibility() == View.GONE){
|
||||
if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
|
||||
return;
|
||||
}
|
||||
prank_group_turntable_icon.setVisibility(View.VISIBLE);
|
||||
}else {
|
||||
prank_group_turntable_icon.setVisibility(View.GONE);
|
||||
|
Loading…
Reference in New Issue
Block a user