新增首页弹窗更多条件控制

This commit is contained in:
zlzw 2023-12-07 18:01:48 +08:00
parent 5895fa8d71
commit 53e6cb5a70
4 changed files with 10 additions and 1 deletions

View File

@ -183,6 +183,7 @@ public class OpenAdManager {
if (model.getShowModel() == OpenAdModel.SHOW_DIY) {
String nextTime= String.valueOf(System.currentTimeMillis() + (Long.parseLong(model.getSection()) * 60 * 1000));
SpUtil.setStringValue("open_ad_popup_time_" + model.getId(), nextTime);
showMap.remove(model.getId());
}
if (model.getModel() == OpenAdModel.MODEL_BOTTOM) {
new OpenAdBottomDialogPopup(CommonAppContext.getTopActivity(), model).setListener((bean, position) -> {

View File

@ -511,6 +511,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
findViewById(R.id.banner_click).setVisibility(View.GONE);
isfloatBannernet = false;
}
mViewHolders[index].onResume();
});
//获取指导员账号
ConversationIMListManager.get(this).getUserInstructor(this);
@ -860,7 +861,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
NoviceInstructorManager.get(mContext).getNoviceInstructor();
NoviceInstructorManager.get(mContext).checktHomeZdyPop();
initAnchorRecommendBanner();
OpenAdManager.getInstance().show(OpenAdManager.TYPE_HOME, false);
}
/**

View File

@ -46,6 +46,7 @@ import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.LiveHttpUtil;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.manager.LiveClassManager;
import com.yunbao.common.manager.OpenAdManager;
import com.yunbao.common.utils.DialogUitl;
import com.yunbao.common.utils.LiveRoomCheckLivePresenter;
import com.yunbao.common.utils.MicStatusManager;
@ -557,6 +558,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
@Override
public void onResume() {
super.onResume();
OpenAdManager.getInstance().show(OpenAdManager.TYPE_HOME, false);
}
@Override

View File

@ -104,6 +104,12 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
}
}
@Override
public void onResume() {
super.onResume();
mViewHolders[mViewPager.getCurrentItem()].onResume();
}
@Override
protected int getPageCount() {
return 4;