ESelect is a enum structure. I hope it will do noting when it is ESelect.NoAction in the following code.
It will cause compile error if I write ; after ESelect.NoAction ->, how can I fix it?
Code
aHomeViewModel.selectAction.observe(mLifecycleOwner, {
when(it) {
ESelect.SelectAll - > binding.chSelect.isChecked = true
ESelect.UnselectAll - > binding.chSelect.isChecked = false
ESelect.NoAction - > ; //It will do nothing
}
})
enum class ESelect {
SelectAll,
UnselectAll,
NoAction
}