combov2: Reset states associated with pump when unpairing

Signed-off-by: Carlos Rafael Giani <crg7475@mailbox.org>
This commit is contained in:
Carlos Rafael Giani 2022-11-06 16:30:34 +01:00
parent cdfb197c54
commit c535e96ec7

View file

@ -1389,6 +1389,12 @@ class ComboV2Plugin @Inject constructor (
}
}
// Reset these states since they are associated
// with the now unpaired pump.
lastConnectionTimestamp = 0L
activeBasalProfile = null
lastActiveBasalProfileNumber = null
// Reset the UI flows that are associated with the pump
// that just got unpaired to prevent the UI from showing
// information about that now-unpaired pump anymore.