update 排位赛中英文IM消息

This commit is contained in:
zlzw 2023-09-16 18:22:51 +08:00
parent 3595b89672
commit 9ff382e35b
3 changed files with 22 additions and 5 deletions

View File

@ -23,6 +23,8 @@ public class PkRankBean extends BaseModel {
public String clickUrl; public String clickUrl;
@SerializedName("vs_img") @SerializedName("vs_img")
public String vsImgUrl; public String vsImgUrl;
@SerializedName("new_rank_name_en")
public String newRankNameEn;
public int getId() { public int getId() {
return id; return id;
@ -94,6 +96,14 @@ public class PkRankBean extends BaseModel {
this.vsImgUrl = vsImgUrl; this.vsImgUrl = vsImgUrl;
} }
public String getNewRankNameEn() {
return newRankNameEn;
}
public void setNewRankNameEn(String newRankNameEn) {
this.newRankNameEn = newRankNameEn;
}
@Override @Override
public String toString() { public String toString() {
return "PkRankBean{" + return "PkRankBean{" +
@ -105,6 +115,7 @@ public class PkRankBean extends BaseModel {
", pkTopImgUrl='" + pkTopImgUrl + '\'' + ", pkTopImgUrl='" + pkTopImgUrl + '\'' +
", clickUrl='" + clickUrl + '\'' + ", clickUrl='" + clickUrl + '\'' +
", vsImgUrl='" + vsImgUrl + '\'' + ", vsImgUrl='" + vsImgUrl + '\'' +
", newRankNameEn='" + newRankNameEn + '\'' +
'}'; '}';
} }
} }

View File

@ -650,6 +650,7 @@ public class SocketRyClient {
pkRankBean.setId(Integer.parseInt(item.getString("new_rank_id"))); pkRankBean.setId(Integer.parseInt(item.getString("new_rank_id")));
pkRankBean.setName(item.getString("new_rank_name")); pkRankBean.setName(item.getString("new_rank_name"));
pkRankBean.setImg(item.getString("new_rank_img")); pkRankBean.setImg(item.getString("new_rank_img"));
pkRankBean.setNewRankNameEn(item.getString("new_rank_name_en"));
EventBus.getDefault().post(new LiveAudienceEvent() EventBus.getDefault().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.PK_RANK_UPDATE) .setType(LiveAudienceEvent.LiveAudienceType.PK_RANK_UPDATE)
.setObject(pkRankBean)); .setObject(pkRankBean));

View File

@ -124,6 +124,7 @@ import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.TimeUtils; import com.yunbao.common.utils.TimeUtils;
import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.utils.formatBigNum; import com.yunbao.common.utils.formatBigNum;
import com.yunbao.common.views.AbsViewHolder; import com.yunbao.common.views.AbsViewHolder;
import com.yunbao.common.views.weight.ClipPathCircleImage; import com.yunbao.common.views.weight.ClipPathCircleImage;
@ -2391,7 +2392,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
private void updatePkRank(PkRankBean bean) { private void updatePkRank(PkRankBean bean) {
if (WordUtil.isNewZh()) {
mPkRankText.setText(bean.getName()); mPkRankText.setText(bean.getName());
} else {
mPkRankText.setText(bean.getNewRankNameEn());
}
ImgLoader.display(mContext, bean.getImg(), mPkRankIcon); ImgLoader.display(mContext, bean.getImg(), mPkRankIcon);
} }