bug fix: UI-2.0/UI-883 tvCountDown must not be null

This commit is contained in:
tongchenfei
2020-07-29 11:03:47 +08:00
parent ac024ffd37
commit b4db944889

View File

@@ -34,12 +34,14 @@ class BydSplashFragment :MvpFragment<BydSplashFragment,BydSplashPresenter>(),Han
override fun handleMessage(msg: Message): Boolean {
if (msg.what == MSG_COUNT_DOWN) {
countDownTime--
if(countDownTime>0) {
tvCountDown.text = countDownTime.toString()
handler.sendEmptyMessageDelayed(MSG_COUNT_DOWN, DEFAULT_COUNT_DOWN_DELAY)
}else{
hideSplash()
tvCountDown?.also {
countDownTime--
if(countDownTime>0) {
it.text = countDownTime.toString()
handler.sendEmptyMessageDelayed(MSG_COUNT_DOWN, DEFAULT_COUNT_DOWN_DELAY)
}else{
hideSplash()
}
}
return true
}