|
@@ -509,14 +509,18 @@ class HomeActivity : BaseActivity<HomeActivityPresenter, ActivityHomeBinding>(),
|
|
override fun bindEvent() {
|
|
override fun bindEvent() {
|
|
//长按检测升级
|
|
//长按检测升级
|
|
tv_version_name.setOnLongClickListener {
|
|
tv_version_name.setOnLongClickListener {
|
|
- if (System.currentTimeMillis() / 1000 - updateLastTime > 10) {
|
|
|
|
- showMessage("检查新版本")
|
|
|
|
- updateLastTime = System.currentTimeMillis() / 1000
|
|
|
|
- val intent = Intent()
|
|
|
|
- intent.setClass(this, AppUpdateActivity::class.java)
|
|
|
|
- startActivity(intent)
|
|
|
|
|
|
+ if (inited) {
|
|
|
|
+ if (System.currentTimeMillis() / 1000 - updateLastTime > 10) {
|
|
|
|
+ showMessage("检查新版本")
|
|
|
|
+ updateLastTime = System.currentTimeMillis() / 1000
|
|
|
|
+ val intent = Intent()
|
|
|
|
+ intent.setClass(this, AppUpdateActivity::class.java)
|
|
|
|
+ startActivity(intent)
|
|
|
|
+ } else {
|
|
|
|
+ showMessage("请10秒后再尝试")
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- showMessage("请10秒后再尝试")
|
|
|
|
|
|
+ showMessage("设备未注册")
|
|
}
|
|
}
|
|
return@setOnLongClickListener true
|
|
return@setOnLongClickListener true
|
|
}
|
|
}
|