Commit e6f30c06 authored by maxiaoliang's avatar maxiaoliang

1

parent 412fa20a
......@@ -46,7 +46,7 @@ class NewMainActivity : BaseActivity<ActivityMainBinding>() {
@RequiresApi(Build.VERSION_CODES.O)
override fun initView() {
// ConfigHelper.enterHomeTimes++
// ConfigHelper.enterHomeTimes++
BarUtils.setStatusBarLightMode(this, true)
BarUtils.setStatusBarColor(this, Color.TRANSPARENT)
// binding.root.updatePadding(top = BarUtils.getStatusBarHeight())
......@@ -86,7 +86,7 @@ class NewMainActivity : BaseActivity<ActivityMainBinding>() {
}
})
Log.e("MXL", "initView: " + "第一天安装")
// Log.e("MXL", "initView: " + ConfigHelper.enterHomeTimes)
// Log.e("MXL", "initView: " + ConfigHelper.enterHomeTimes)
// if(!ConfigHelper.isfirstInstall){
// if ((ConfigHelper.enterHomeTimes % 1000).toInt() == 2 || (ConfigHelper.enterHomeTimes % 1000).toInt() == 3) {
// //第二次进入首页
......@@ -162,12 +162,14 @@ class NewMainActivity : BaseActivity<ActivityMainBinding>() {
val s = SPUtils.getInstance().getInt("outcomeReturnCount", 0)
if (s == 1) {
startActivity(Intent(this, BackRelsutAt::class.java))
// val localCount = SPUtils.getInstance().getInt("localCount", 0)
// SPUtils.getInstance().put("localCount", localCount + 1)
// val n = SPUtils.getInstance().getInt("outcomeReturnHomeCount", 0)
// if (n > 0) {
val localCount = SPUtils.getInstance().getInt("localCount", 0)
SPUtils.getInstance().put("localCount", localCount + 1)
val n = SPUtils.getInstance().getInt("outcomeReturnHomeCount", 0)
if (localCount < n) {
startActivity(Intent(this, BackRelsutAt::class.java))
}
// if (localCount % n == 0) {
// startActivity(Intent(this, BackRelsutAt::class.java))
//
// }
// }
}
......
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