Force always to go to prepare patch on activation

This commit is contained in:
jbr7rr 2023-06-10 08:10:07 +02:00
parent 0ce25c1190
commit e568ab399f

View file

@ -44,12 +44,13 @@ class MedtrumOverviewFragment : MedtrumBaseFragment<FragmentMedtrumOverviewBindi
eventHandler.observe(viewLifecycleOwner) { evt -> eventHandler.observe(viewLifecycleOwner) { evt ->
when (evt.peekContent()) { when (evt.peekContent()) {
EventType.ACTIVATION_CLICKED -> requireContext().apply { EventType.ACTIVATION_CLICKED -> requireContext().apply {
var step = convertToPatchStep(medtrumPump.pumpState) // TODO: Check what to do with this, and if we need this, it currently messes up patch is last registered as priming
if (step == PatchStep.DEACTIVATION_COMPLETE) { // var step = convertToPatchStep(medtrumPump.pumpState)
// Reset // if (step == PatchStep.DEACTIVATION_COMPLETE) {
step = PatchStep.PREPARE_PATCH // // Reset
} // step = PatchStep.PREPARE_PATCH
startActivity(MedtrumActivity.createIntentFromMenu(this, step)) // }
startActivity(MedtrumActivity.createIntentFromMenu(this, PatchStep.PREPARE_PATCH))
} }
EventType.DEACTIVATION_CLICKED -> requireContext().apply { EventType.DEACTIVATION_CLICKED -> requireContext().apply {