解决crash
This commit is contained in:
parent
06fc43a454
commit
0d31395d7a
|
|
@ -92,8 +92,9 @@ class BenefitActivity : AppViewsActivity<ViewBinding, UiState, ViewModel>(), OnT
|
|||
|
||||
private fun initAddSubTaskViews() {
|
||||
val taskStateHelper = TaskManager.instance().boxTaskStatus()
|
||||
val currentBoxState = taskStateHelper.getStatusBean().tasks[taskStateHelper.getCurrentBoxIndex()]
|
||||
|
||||
var subTaskIndex = taskStateHelper.getCurrentBoxIndex()
|
||||
if (subTaskIndex >= 0) {
|
||||
val currentBoxState = taskStateHelper.getStatusBean().tasks[subTaskIndex]
|
||||
currentBoxState.tasks.forEachIndexed { index, subTask ->
|
||||
val separateLine = View(this@BenefitActivity)
|
||||
separateLine.setBackgroundResource(R.color.gray_f2)
|
||||
|
|
@ -110,6 +111,8 @@ class BenefitActivity : AppViewsActivity<ViewBinding, UiState, ViewModel>(), OnT
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun handleActionButClicked(taskType: Int) {
|
||||
when (taskType) {
|
||||
BOX_SUB_TASK_TYPE_AD -> {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class HomeItemFragment : AppViewsEmptyViewModelFragment<ViewBinding>() {
|
|||
AndroidUtil.openUrl(VidiConst.URL_GAME)
|
||||
},
|
||||
PopMenuIconView.MenuItem(R.mipmap.home_menu_4) {
|
||||
Router.Benefit.startActivity(requireActivity())
|
||||
Router.ZeroBuy.startActivity(requireActivity())
|
||||
}
|
||||
))
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ class BoxTaskHelper: BaseTaskHelper<TaskStateBoxRoot, BoxTaskRoot>() {
|
|||
return index
|
||||
}
|
||||
}
|
||||
return -1
|
||||
return 0
|
||||
}
|
||||
|
||||
fun getCurrentBoxState(): TaskStateBox? {
|
||||
|
|
|
|||
Loading…
Reference in New Issue