fix [修复直播数量不足且战令关闭情况下,显示角标Banner白屏问题]

update [替换战令角标]
add [从首页Banner进入战令入口]
add [从弹窗进入战令入口]
This commit is contained in:
zlzw 2024-03-26 17:37:26 +08:00
parent f7845dde6f
commit 9db23a32d1
6 changed files with 24 additions and 5 deletions

View File

@ -96,6 +96,9 @@ public class OpenAdModel extends BaseModel {
}
return url + "?t=" + System.currentTimeMillis() / 1000;
}
public String getOriginalUrl(){
return url;
}
public void setUrl(String url) {
this.url = url;

View File

@ -14,6 +14,7 @@ import com.yunbao.common.bean.OpenAdModel;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.RouteUtil;
import com.yunbao.common.utils.ScreenDimenUtil;
public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
@ -65,6 +66,11 @@ public class OpenAdCenterDialogPopup extends AbsDialogFullScreenPopupWindow {
mClose = findViewById(R.id.close);
findViewById(R.id.layout).setOnClickListener(v -> dismiss());
mImageView.setOnClickListener(v -> {
if("home_page_banner_battle".equals(model.getOriginalUrl())){
RouteUtil.forwardBattlePass();
dismiss();
return;
}
WebViewActivity.forward(mContext, model.getUrl(), model.getType() != OpenAdModel.TYPE_HOME);
if (mListener != null) {
mListener.onItemClick(model, 1);

View File

@ -55,6 +55,7 @@ import com.yunbao.common.Constants;
import com.yunbao.common.activity.AbsActivity;
import com.yunbao.common.activity.WebViewActivity;
import com.yunbao.common.adapter.ViewPagerAdapter;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.AnchorStartLiveBean;
import com.yunbao.common.bean.ChatRemarksBean;
@ -633,20 +634,27 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
((TextView) floatRedPacket.findViewById(R.id.progressText)).setText(data.getRedPacketNum() + "/" + data.getRedPacketTotal());
}
if (data.getShowWarOrder() == 0) {
floatWarOrder.setVisibility(View.GONE);
floatBanner.setVisibility(View.VISIBLE);
findViewById(R.id.banner_click).setVisibility(View.VISIBLE);
//战令关闭情况下在判断一次Banner是否足够
if (data.getListShow() == 1 && data.getList().size() > 2) {
floatBanner.setVisibility(View.VISIBLE);
findViewById(R.id.banner_click).setVisibility(View.VISIBLE);
floatBanner.showBanner(data.getList());
} else {
floatBanner.setVisibility(View.GONE);
findViewById(R.id.banner_click).setVisibility(View.GONE);
}
} else {
if (mainHomeViewHolder!=null&&mainHomeViewHolder.isFloatWarOrder()){
if (mainHomeViewHolder != null && mainHomeViewHolder.isFloatWarOrder()) {
floatWarOrder.setVisibility(View.GONE);
}else {
} else {
floatWarOrder.setVisibility(View.VISIBLE);
}
floatBanner.setVisibility(View.GONE);
findViewById(R.id.banner_click).setVisibility(View.GONE);
}
}
@Override

View File

@ -458,6 +458,8 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement
if (link.contains("http")) {
WebViewActivity.forward(mContext, link, true, false);
} else if ("home_page_banner_battle".equals(link)) {
RouteUtil.forwardBattlePass();
} else {
gotoLive(link);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 75 KiB