修复主页classtab可能为空导致的闪退问题(报错平台反馈)

This commit is contained in:
zlzw 2023-12-06 13:17:13 +08:00
parent 0c7ae4e4f7
commit ef76b2c7e4
2 changed files with 6 additions and 3 deletions

View File

@ -829,7 +829,7 @@ public class IMLoginModel extends BaseModel {
return yuanbao;
}
public IMLoginModel setYuanbao(long yuanbao) {
public IMLoginModel setYuanbao(double yuanbao) {
this.yuanbao = yuanbao;
return this;
}

View File

@ -52,6 +52,7 @@ import com.yunbao.common.utils.MicStatusManager;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.views.CustomViewHolder;
import com.yunbao.live.utils.LiveStorge;
import com.yunbao.live.views.LiveRoomViewHolder;
@ -129,8 +130,10 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
@Override
public void init() {
List<LiveClassBean> list = new LiveClassManager(mContext).getLiveClass();
if (list != null && !list.isEmpty()) {
typeHot = list.get(0).getEnglish();
select = list.get(0).getId();
}
mShadow = findViewById(R.id.shadow);
mBtnDismiss = findViewById(R.id.btn_dismiss);
mBtnDismiss.setOnClickListener(new View.OnClickListener() {