CommandQueue: always create EffectiveProfileSwitch on success

This commit is contained in:
Milos Kozak 2023-11-21 14:18:24 +01:00
parent ef3a8fbffa
commit 428d6c4fee

View file

@ -125,7 +125,8 @@ class CommandQueueImplementation @Inject constructor(
override fun run() {
if (!result.success) {
uiInteraction.runAlarm(result.comment, rh.gs(app.aaps.core.ui.R.string.failed_update_basal_profile), app.aaps.core.ui.R.raw.boluserror)
} else if (result.enacted || effective is ValueWrapper.Existing && effective.value.originalEnd < dateUtil.now() && effective.value.originalDuration != 0L) {
} else /* if (result.enacted || effective is ValueWrapper.Existing && effective.value.originalEnd < dateUtil.now() && effective.value.originalDuration != 0L) */ {
// Pump may return enacted == false if basal profile is the same, but IC/ISF can be different
val nonCustomized = ProfileSealed.PS(it).convertToNonCustomizedProfile(dateUtil)
EffectiveProfileSwitch(
timestamp = dateUtil.now(),