This commit is contained in:
hch 2024-03-20 16:34:23 +08:00
parent 307ded37fc
commit f662ec4259
2 changed files with 7 additions and 6 deletions

View File

@ -162,7 +162,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
private ViewPager mViewPager;
private List<FrameLayout> mViewList;
private MainHomeComViewHolder mainHomeComViewHolder;
private MainHomeLiveViewHolder mainHomeLiveViewHolder;
private MainHomeViewHolder mainHomeViewHolder;
private MainHomeCommunityViewHolder mMainHomeCommunityViewHolder;
private MainMessageViewHolder mainMessageViewHolder;
private MainMeViewHolder mMeViewHolder;
@ -1136,10 +1136,10 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
mainHomeComViewHolder = new MainHomeComViewHolder(mContext, parent);
vh = mainHomeComViewHolder;
} else if (position == 1) {
/* mainHomeLiveViewHolder = new MainHomeLiveViewHolder(mContext, parent);//直播
vh = mainHomeLiveViewHolder;*/
mMainHomeCommunityViewHolder = new MainHomeCommunityViewHolder(mContext, parent, this);//直播
vh = mMainHomeCommunityViewHolder;
mainHomeViewHolder = new MainHomeViewHolder(mContext, parent);
vh = mainHomeViewHolder;
/* mMainHomeCommunityViewHolder = new MainHomeCommunityViewHolder(mContext, parent, this);//直播
vh = mMainHomeCommunityViewHolder;*/
} else if (position == 2) {
mainMessageViewHolder = new MainMessageViewHolder(this, parent);
vh = mainMessageViewHolder;

View File

@ -25,6 +25,7 @@ import com.yunbao.common.manager.CommunityTypeManager;
import com.yunbao.common.manager.OpenAdManager;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.StringUtil;
import com.yunbao.main.R;
import com.yunbao.main.adapter.MainHomeComAdapter;
import com.yunbao.main.adapter.MainHomeComClassAdapter;
@ -92,7 +93,7 @@ public class MainHomeNewViewHolder extends AbsMainHomeChildViewHolder implements
@Override
public void init() {
List<NewCommunityType> list = new CommunityTypeManager(mContext).getCommunityTypeList();
if (list != null && !list.isEmpty()) {
if (list != null && !list.isEmpty()&& !StringUtil.isEmpty(list.get(0).getTalk_name())) {
typeHot = list.get(0).getTalk_name();
select = list.get(0).getId();
} else {