Fix missing branch in when

This commit is contained in:
Valere 2021-09-07 15:16:38 +02:00
parent 99123bf0cc
commit a41bec9476

View file

@ -56,18 +56,21 @@ class SpaceCreationActivity : SimpleFragmentActivity(), CreateSpaceViewModel.Fac
super.onCreate(savedInstanceState)
if (isFirstCreation()) {
when (withState(viewModel) { it.step }) {
CreateSpaceState.Step.ChooseType -> {
CreateSpaceState.Step.ChooseType -> {
navigateToFragment(ChooseSpaceTypeFragment::class.java)
}
CreateSpaceState.Step.SetDetails -> {
CreateSpaceState.Step.SetDetails -> {
navigateToFragment(ChooseSpaceTypeFragment::class.java)
}
CreateSpaceState.Step.AddRooms -> {
CreateSpaceState.Step.AddRooms -> {
navigateToFragment(CreateSpaceDefaultRoomsFragment::class.java)
}
CreateSpaceState.Step.ChoosePrivateType -> {
CreateSpaceState.Step.ChoosePrivateType -> {
navigateToFragment(ChoosePrivateSpaceTypeFragment::class.java)
}
CreateSpaceState.Step.AddEmailsOrInvites -> {
navigateToFragment(CreateSpaceAdd3pidInvitesFragment::class.java)
}
}
}
}