diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt index a8e296aee6..0f71901f2a 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/OmnipodDashPumpPlugin.kt @@ -1031,7 +1031,7 @@ class OmnipodDashPumpPlugin @Inject constructor( DateFormat.format("HH:mm", Date(this.startTime)) ) + "\n" } - val (temporaryBasal, extendedBolus, _, profile) = pumpSync.expectedPumpState() + val temporaryBasal = pumpSync.expectedPumpState().temporaryBasal temporaryBasal?.run { ret += resourceHelper.gs( R.string.omnipod_common_short_status_temp_basal, @@ -1229,7 +1229,7 @@ class OmnipodDashPumpPlugin @Inject constructor( expirationReminderEnabled, expirationHours ).andThen( - podStateManager.updateExpirationAlertSettings( + podStateManager.updateLowReservoirAlertSettings( lowReservoirAlertEnabled, lowReservoirAlertUnits ) diff --git a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt index e77bea3043..f22cddd96a 100644 --- a/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt +++ b/omnipod-dash/src/main/java/info/nightscout/androidaps/plugins/pump/omnipod/dash/ui/wizard/activation/viewmodel/action/DashInsertCannulaViewModel.kt @@ -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,7 +99,6 @@ class DashInsertCannulaViewModel @Inject constructor( pumpSerial = podStateManager.uniqueId?.toString() ?: "n/a" ) - podStateManager.updateExpirationAlertSettings(expirationReminderEnabled, expirationHours) rxBus.send(EventDismissNotification(Notification.OMNIPOD_POD_NOT_ATTACHED)) source.onSuccess(PumpEnactResult(injector).success(true)) }