Force always to go to prepare patch on activation
This commit is contained in:
parent
0ce25c1190
commit
e568ab399f
1 changed files with 7 additions and 6 deletions
|
@ -44,12 +44,13 @@ class MedtrumOverviewFragment : MedtrumBaseFragment<FragmentMedtrumOverviewBindi
|
|||
eventHandler.observe(viewLifecycleOwner) { evt ->
|
||||
when (evt.peekContent()) {
|
||||
EventType.ACTIVATION_CLICKED -> requireContext().apply {
|
||||
var step = convertToPatchStep(medtrumPump.pumpState)
|
||||
if (step == PatchStep.DEACTIVATION_COMPLETE) {
|
||||
// Reset
|
||||
step = PatchStep.PREPARE_PATCH
|
||||
}
|
||||
startActivity(MedtrumActivity.createIntentFromMenu(this, step))
|
||||
// TODO: Check what to do with this, and if we need this, it currently messes up patch is last registered as priming
|
||||
// var step = convertToPatchStep(medtrumPump.pumpState)
|
||||
// if (step == PatchStep.DEACTIVATION_COMPLETE) {
|
||||
// // Reset
|
||||
// step = PatchStep.PREPARE_PATCH
|
||||
// }
|
||||
startActivity(MedtrumActivity.createIntentFromMenu(this, PatchStep.PREPARE_PATCH))
|
||||
}
|
||||
|
||||
EventType.DEACTIVATION_CLICKED -> requireContext().apply {
|
||||
|
|
Loading…
Reference in a new issue