Move uel.log outside Callback
This commit is contained in:
parent
f5330287e9
commit
09aa909cd6
1 changed files with 4 additions and 5 deletions
|
@ -224,15 +224,14 @@ class InsulinDialog : DialogFragmentWithDate() {
|
||||||
{ aapsLogger.error(LTag.DATABASE, "Error while saving bolus", it) }
|
{ aapsLogger.error(LTag.DATABASE, "Error while saving bolus", it) }
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
uel.log(Action.BOLUS, Sources.InsulinDialog,
|
||||||
|
notes,
|
||||||
|
ValueWithUnit.Insulin(insulinAfterConstraints))
|
||||||
commandQueue.bolus(detailedBolusInfo, object : Callback() {
|
commandQueue.bolus(detailedBolusInfo, object : Callback() {
|
||||||
override fun run() {
|
override fun run() {
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
ErrorHelperActivity.runAlarm(ctx, result.comment, resourceHelper.gs(R.string.treatmentdeliveryerror), info.nightscout.androidaps.dana.R.raw.boluserror)
|
ErrorHelperActivity.runAlarm(ctx, result.comment, resourceHelper.gs(R.string.treatmentdeliveryerror), info.nightscout.androidaps.dana.R.raw.boluserror)
|
||||||
} else
|
}
|
||||||
uel.log(Action.BOLUS, Sources.InsulinDialog,
|
|
||||||
notes,
|
|
||||||
ValueWithUnit.Insulin(insulinAfterConstraints))
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue