Merge remote-tracking branch 'origin/dev_改版主分支' into dev_改版主分支

This commit is contained in:
zlzw 2024-03-20 16:39:47 +08:00
commit f3d19e37bb
2 changed files with 7 additions and 6 deletions

View File

@ -164,7 +164,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;
@ -1155,10 +1155,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 {