diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 157553067..28ba56ebe 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -162,7 +162,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene private ViewPager mViewPager; private List 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; diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeNewViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeNewViewHolder.java index a5de8c7fe..9d00a171c 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeNewViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeNewViewHolder.java @@ -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 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 {