Commit 905f3de6 authored by mengcuiguang's avatar mengcuiguang

添加看广告次数字段

parent 4d4c2838
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
<bytecodeTargetLevel target="1.8" />
</component>
</project>
\ No newline at end of file
......@@ -12,8 +12,8 @@ android {
applicationId "com.mints.helivideo"
minSdkVersion rootProject.ext.androidMinSdkVersion
targetSdkVersion rootProject.ext.androidTargetSdkVersion
versionCode 7
versionName "1.0.6"
versionCode 8
versionName "1.0.7"
flavorDimensions "default"
// dex突破65535的限制
......
......@@ -10,6 +10,8 @@ public class RecommendBean implements Serializable {
private String showVedioUrl;
private int adShowCount;
public VedioBean getVedioMsg() {
return vedioMsg;
......@@ -26,4 +28,12 @@ public class RecommendBean implements Serializable {
public void setShowVedioUrl(String showVedioUrl) {
this.showVedioUrl = showVedioUrl;
}
public int getAdShowCount() {
return adShowCount;
}
public void setAdShowCount(int adShowCount) {
this.adShowCount = adShowCount;
}
}
......@@ -402,11 +402,11 @@ class MainFragment : LazyLoadBaseFragment(), HomeView, View.OnClickListener, OnR
val mainTwoRecommend =
AppPreferencesManager.get().getBoolean(Constant.MAIN_TWO_RECOMMEND, false)
val adCount = AppPreferencesManager.get().getInt(Constant.VEDIO_AD_COUNT, 0)
if (!mainTwoRecommend && adCount > 10) {
if (!mainTwoRecommend && adCount > data!!.vedio3.adShowCount) {
AppPreferencesManager.get().put(Constant.MAIN_TWO_RECOMMEND, true)
Handler(Looper.getMainLooper()).postDelayed({
val bundle = Bundle()
bundle.putString(Constant.VEDIO_BEAN, JsonUtil.toJson(data))
bundle.putString(Constant.VEDIO_BEAN, JsonUtil.toJson(data.vedio3))
readyGo(RecommendActivity::class.java, bundle)
}, 300)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment