This commit is contained in:
Andrei Vereha 2021-10-14 22:09:13 +02:00
parent 60beb0f5b6
commit 883c2322d2

View file

@ -65,13 +65,9 @@ class DashInsertCannulaViewModel @Inject constructor(
null
super.disposable += omnipodManager.activatePodPart2(basalProgram, expirationHoursBeforeShutdown)
.ignoreElements()
.andThen(podStateManager.updateExpirationAlertSettings(expirationReminderEnabled, expirationHours))
.subscribeBy(
onNext = { podEvent ->
logger.debug(
LTag.PUMP,
"Received PodEvent in Pod activation part 2: $podEvent"
)
},
onError = { throwable ->
logger.error(LTag.PUMP, "Error in Pod activation part 2", throwable)
source.onSuccess(PumpEnactResult(injector).success(false).comment(I8n.textFromException(throwable, resourceHelper)))
@ -103,14 +99,6 @@ class DashInsertCannulaViewModel @Inject constructor(
pumpSerial = podStateManager.uniqueId?.toString() ?: "n/a"
)
val err = podStateManager.updateExpirationAlertSettings(
expirationReminderEnabled,
expirationHours
)
.blockingGet()
err?.let {
logger.warn(LTag.PUMP, "Error updating local alert settings: $err")
}
rxBus.send(EventDismissNotification(Notification.OMNIPOD_POD_NOT_ATTACHED))
source.onSuccess(PumpEnactResult(injector).success(true))
}