bug fix: UI-2.0/UI-883 tvCountDown must not be null
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user