nicer
This commit is contained in:
parent
60beb0f5b6
commit
883c2322d2
1 changed files with 2 additions and 14 deletions
|
@ -65,13 +65,9 @@ class DashInsertCannulaViewModel @Inject constructor(
|
||||||
null
|
null
|
||||||
|
|
||||||
super.disposable += omnipodManager.activatePodPart2(basalProgram, expirationHoursBeforeShutdown)
|
super.disposable += omnipodManager.activatePodPart2(basalProgram, expirationHoursBeforeShutdown)
|
||||||
|
.ignoreElements()
|
||||||
|
.andThen(podStateManager.updateExpirationAlertSettings(expirationReminderEnabled, expirationHours))
|
||||||
.subscribeBy(
|
.subscribeBy(
|
||||||
onNext = { podEvent ->
|
|
||||||
logger.debug(
|
|
||||||
LTag.PUMP,
|
|
||||||
"Received PodEvent in Pod activation part 2: $podEvent"
|
|
||||||
)
|
|
||||||
},
|
|
||||||
onError = { throwable ->
|
onError = { throwable ->
|
||||||
logger.error(LTag.PUMP, "Error in Pod activation part 2", throwable)
|
logger.error(LTag.PUMP, "Error in Pod activation part 2", throwable)
|
||||||
source.onSuccess(PumpEnactResult(injector).success(false).comment(I8n.textFromException(throwable, resourceHelper)))
|
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"
|
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))
|
rxBus.send(EventDismissNotification(Notification.OMNIPOD_POD_NOT_ATTACHED))
|
||||||
source.onSuccess(PumpEnactResult(injector).success(true))
|
source.onSuccess(PumpEnactResult(injector).success(true))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue