diff --git a/common/src/main/java/com/yunbao/common/bean/PrankProgressBean.java b/common/src/main/java/com/yunbao/common/bean/PrankProgressBean.java index 02c9953bb..83c3af541 100644 --- a/common/src/main/java/com/yunbao/common/bean/PrankProgressBean.java +++ b/common/src/main/java/com/yunbao/common/bean/PrankProgressBean.java @@ -1,5 +1,7 @@ package com.yunbao.common.bean; +import com.google.gson.JsonElement; + import java.util.List; public class PrankProgressBean extends BaseModel { @@ -7,7 +9,7 @@ public class PrankProgressBean extends BaseModel { private int prank_turntable_status;// 转盘整蛊状态 0=关闭 1=开启 private int prank_type;// 整蛊类型 1.礼物整蛊 2.连击整蛊 private List prank_list;// 整蛊进度 - private List completed_list;// 待完成的整蛊 + private JsonElement completed_list;// 待完成的整蛊 public PrankProgressBean(){ } @@ -23,6 +25,26 @@ public class PrankProgressBean extends BaseModel { private String gift_name;// 礼物名称 private String gift_icon; // 礼物图片链接 + private String gift_name_en; + + private int continuous_click_num; + + public int getContinuous_click_num() { + return continuous_click_num; + } + + public void setContinuous_click_num(int continuous_click_num) { + this.continuous_click_num = continuous_click_num; + } + + public String getGift_name_en() { + return gift_name_en; + } + + public void setGift_name_en(String gift_name_en) { + this.gift_name_en = gift_name_en; + } + public int getGift_id() { return gift_id; } @@ -85,16 +107,6 @@ public class PrankProgressBean extends BaseModel { return (double) send_num / gift_num; } - public PrankList(int gift_id, int gift_num, String prank_content, int send_num, int completed_num, String gift_name, String gift_icon) { - this.gift_id = gift_id; - this.gift_num = gift_num; - this.prank_content = prank_content; - this.send_num = send_num; - this.completed_num = completed_num; - this.gift_name = gift_name; - this.gift_icon = gift_icon; - } - @Override public String toString() { return "PrankList{" + @@ -105,6 +117,8 @@ public class PrankProgressBean extends BaseModel { ", completed_num=" + completed_num + ", gift_name='" + gift_name + '\'' + ", gift_icon='" + gift_icon + '\'' + + ", gift_name_en='" + gift_name_en + '\'' + + ", continuous_click_num=" + continuous_click_num + '}'; } } @@ -133,11 +147,11 @@ public class PrankProgressBean extends BaseModel { this.prank_list = prank_list; } - public List getCompleted_list() { + public JsonElement getCompleted_list() { return completed_list; } - public void setCompleted_list(List completed_list) { + public void setCompleted_list(JsonElement completed_list) { this.completed_list = completed_list; } diff --git a/live/src/main/java/com/yunbao/live/adapter/PrankAdapter.java b/live/src/main/java/com/yunbao/live/adapter/PrankAdapter.java index e0d0589b5..9f5dca190 100644 --- a/live/src/main/java/com/yunbao/live/adapter/PrankAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/PrankAdapter.java @@ -13,6 +13,7 @@ import androidx.recyclerview.widget.RecyclerView; import com.yunbao.common.bean.PrankProgressBean; import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.utils.WordUtil; import com.yunbao.live.R; import com.yunbao.live.views.LiveRoomViewHolder; @@ -47,7 +48,7 @@ public class PrankAdapter extends RecyclerView.Adapter onItemClickListener.onItemClick(v,data.getGift_id())); holder.prank_item_subscript.setText(String.valueOf(data.getCompleted_num())); holder.prank_item_prank_name.setText(data.getPrank_content()); - holder.prank_item_gift_name.setText(data.getGift_name()); + holder.prank_item_gift_name.setText(WordUtil.isNewZh() ? data.getGift_name() : data.getGift_name_en()); holder.prank_item_now_progress.setText(String.valueOf(data.getSend_num())); holder.prank_item_total_progress.setText("/"+ data.getGift_num()); ImgLoader.display(mContext,data.getGift_icon(),holder.prank_item_icon);