Make sure patch can be primed when already filled before activation
This commit is contained in:
parent
ecb2c977ec
commit
0ce25c1190
1 changed files with 5 additions and 0 deletions
|
@ -170,6 +170,11 @@ class MedtrumViewModel @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
fun preparePatch() {
|
fun preparePatch() {
|
||||||
|
// Make sure patch step is updated when already filled
|
||||||
|
// TODO: Maybe a nicer solution for this
|
||||||
|
if (medtrumPump.pumpState == MedtrumPumpState.FILLED) {
|
||||||
|
updateSetupStep(SetupStep.FILLED)
|
||||||
|
}
|
||||||
// New session, generate new session token, only do this when not connected
|
// New session, generate new session token, only do this when not connected
|
||||||
if (medtrumService?.isConnected == false) {
|
if (medtrumService?.isConnected == false) {
|
||||||
aapsLogger.info(LTag.PUMP, "preparePatch: new session")
|
aapsLogger.info(LTag.PUMP, "preparePatch: new session")
|
||||||
|
|
Loading…
Reference in a new issue