当用户设置语言为英语时,将会调整首页推送逻辑,【英语】标签将会提前到第一位并默认展示【英语】标签内容;
This commit is contained in:
@@ -97,6 +97,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
private boolean isHave = false;
|
||||
private Map<String, String> gotoRoomKey = new HashMap<>();
|
||||
private Dialog mShowLoadingDialog;
|
||||
private String typeHot;
|
||||
|
||||
public MainHomeLiveViewHolder(Context context, ViewGroup parentView) {
|
||||
super(context, parentView);
|
||||
@@ -127,6 +128,8 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
List<LiveClassBean> list = new LiveClassManager(mContext).getLiveClass();
|
||||
typeHot= list.get(0).getEnglish();
|
||||
mShadow = findViewById(R.id.shadow);
|
||||
mBtnDismiss = findViewById(R.id.btn_dismiss);
|
||||
mBtnDismiss.setOnClickListener(new View.OnClickListener() {
|
||||
@@ -175,7 +178,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
@Override
|
||||
public void loadData(int p, HttpCallback callback) {
|
||||
Log.i("t2", "aaa" + p);
|
||||
if (select == 0) {
|
||||
if (TextUtils.equals(typeHot, "Hot") || TextUtils.equals(typeHot, "hot") || TextUtils.equals(typeHot, "熱門")) {
|
||||
pp = 1;
|
||||
LiveHttpUtil.getAnchorLastWeekList(new HttpCallback() {
|
||||
@Override
|
||||
@@ -210,7 +213,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
new_data = new ArrayList<>();
|
||||
if (info.length > 0) {
|
||||
JSONObject obj = JSON.parseObject(info[0]);
|
||||
if (select == 0) {
|
||||
|
||||
mBannerList = JSON.parseArray(obj.getString("slide"), BannerBean.class);
|
||||
if (!obj.containsKey("list")) {
|
||||
return new_data;
|
||||
@@ -235,10 +238,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
old_data.remove(liveModel);
|
||||
}
|
||||
new_data.addAll(old_data);
|
||||
} else {
|
||||
|
||||
new_data = JSON.parseArray(Arrays.toString(info), LiveBean.class);
|
||||
}
|
||||
}
|
||||
return new_data;
|
||||
}
|
||||
@@ -278,7 +278,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
mClassRecyclerViewTop = (RecyclerView) findViewById(R.id.classRecyclerView_top);
|
||||
mClassRecyclerViewTop.setHasFixedSize(true);
|
||||
mClassRecyclerViewTop.setLayoutManager(new LinearLayoutManager(mContext, LinearLayoutManager.HORIZONTAL, false));
|
||||
List<LiveClassBean> list = new LiveClassManager(mContext).getLiveClass();
|
||||
|
||||
if (list != null && list.size() > 0) {
|
||||
List<LiveClassBean> targetList = new ArrayList<>();
|
||||
if (list.size() <= 6) {
|
||||
@@ -316,11 +316,8 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
|
||||
if (!canClick()) {
|
||||
return;
|
||||
}
|
||||
if (position != 0) {
|
||||
select = bean.getId();
|
||||
} else {
|
||||
select = 0;
|
||||
}
|
||||
select = bean.getId();
|
||||
typeHot = bean.getEnglish();
|
||||
mRefreshView.initData();
|
||||
topAdapter.choice = position;
|
||||
topAdapter.notifyDataSetChanged();
|
||||
|
||||
Reference in New Issue
Block a user