This commit is contained in:
Andrei Vereha 2021-06-03 22:18:25 +02:00
commit 17c61db256

View file

@ -333,7 +333,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
return ret return ret
} }
private fun observeNoActiveTempBasal(enforeNew: Boolean): Completable { private fun observeNoActiveTempBasal(enforceNew: Boolean): Completable {
return Completable.defer { return Completable.defer {
when { when {
podStateManager.deliveryStatus !in podStateManager.deliveryStatus !in
@ -343,7 +343,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
Completable.complete() Completable.complete()
} }
!enforeNew -> !enforceNew ->
Completable.error( Completable.error(
IllegalStateException( IllegalStateException(
"Temporary basal already active and enforeNew is not set." "Temporary basal already active and enforeNew is not set."
@ -364,7 +364,7 @@ class OmnipodDashPumpPlugin @Inject constructor(
private fun observeActiveTempBasal(): Completable { private fun observeActiveTempBasal(): Completable {
return Completable.defer { return Completable.defer {
if (pumpSync.expectedPumpState().temporaryBasal != null) if (podStateManager.tempBasalActive)
Completable.complete() Completable.complete()
else else
Completable.error( Completable.error(