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