Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
49df393781
@ -1,8 +1,8 @@
|
||||
package com.yunbao.common.bean;
|
||||
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.yunbao.common.utils.StringUtil;
|
||||
import com.yunbao.common.utils.WordUtil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -36,8 +36,10 @@ public class LiveRoomVoteModel extends BaseModel {
|
||||
private String answer1;
|
||||
@SerializedName("option_content_second")
|
||||
private String answer2;
|
||||
@SerializedName("result")
|
||||
private String result;
|
||||
@SerializedName("result_zh")
|
||||
private String resultZh;
|
||||
@SerializedName("result_en")
|
||||
private String resultEn;
|
||||
@SerializedName("option_text")
|
||||
private String optionText;
|
||||
@SerializedName("option_content_key")
|
||||
@ -126,11 +128,23 @@ public class LiveRoomVoteModel extends BaseModel {
|
||||
}
|
||||
|
||||
public String getResult() {
|
||||
return result;
|
||||
return WordUtil.isZh() ? resultZh : resultEn;
|
||||
}
|
||||
|
||||
public void setResult(String result) {
|
||||
this.result = result;
|
||||
public String getResultZh() {
|
||||
return resultZh;
|
||||
}
|
||||
|
||||
public void setResultZh(String resultZh) {
|
||||
this.resultZh = resultZh;
|
||||
}
|
||||
|
||||
public String getResultEn() {
|
||||
return resultEn;
|
||||
}
|
||||
|
||||
public void setResultEn(String resultEn) {
|
||||
this.resultEn = resultEn;
|
||||
}
|
||||
|
||||
public String getOptionText() {
|
||||
@ -153,7 +167,8 @@ public class LiveRoomVoteModel extends BaseModel {
|
||||
", userIds=" + userIds +
|
||||
", answer1='" + answer1 + '\'' +
|
||||
", answer2='" + answer2 + '\'' +
|
||||
", result='" + result + '\'' +
|
||||
", resultZh='" + resultZh + '\'' +
|
||||
", resultEn='" + resultEn + '\'' +
|
||||
", optionText='" + optionText + '\'' +
|
||||
", vote='" + vote + '\'' +
|
||||
", liveUid='" + liveUid + '\'' +
|
||||
|
@ -3,6 +3,7 @@ package com.yunbao.common.utils;
|
||||
import android.content.res.Resources;
|
||||
|
||||
import com.yunbao.common.CommonAppContext;
|
||||
import com.yunbao.common.manager.IMLoginManager;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Matcher;
|
||||
@ -26,9 +27,7 @@ public class WordUtil {
|
||||
}
|
||||
|
||||
public static boolean isZh() {
|
||||
Locale locale = sResources.getConfiguration().locale;
|
||||
String language = locale.getLanguage();
|
||||
return language.endsWith("zh");
|
||||
return IMLoginManager.get(CommonAppContext.sInstance).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1365,7 +1365,8 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
voteModel.setAnswer2(map.getString("answer2"));
|
||||
voteModel.setAnswer1Num(map.getInteger("num1"));
|
||||
voteModel.setAnswer2Num(map.getInteger("num2"));
|
||||
voteModel.setResult(map.getString("result"));
|
||||
voteModel.setResultZh(map.getString("result_zh"));
|
||||
voteModel.setResultEn(map.getString("result_en"));
|
||||
voteModel.setOptionText(map.getString("option_text"));
|
||||
System.out.println(">>>" + voteModel);
|
||||
String content = voteModel.getResult();
|
||||
|
Loading…
Reference in New Issue
Block a user