Fix creating treatment record when bolusing (carb only treatment).

This commit is contained in:
Johannes Mockenhaupt 2017-07-21 08:57:35 +02:00
parent 46b1dff334
commit d7eee17112
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -357,7 +357,7 @@ public class ComboPlugin implements PluginBase, PumpInterface {
} }
return pumpEnactResult; return pumpEnactResult;
} else { } else {
// no bolus required // no bolus required, carb only treatment
// TODO the ui freezes when the calculator issues a carb-only treatment // TODO the ui freezes when the calculator issues a carb-only treatment
// so just wait, yeah, this is dumb. for now; proper fix via GL#10 // so just wait, yeah, this is dumb. for now; proper fix via GL#10
@ -369,6 +369,7 @@ public class ComboPlugin implements PluginBase, PumpInterface {
pumpEnactResult.bolusDelivered = 0d; pumpEnactResult.bolusDelivered = 0d;
pumpEnactResult.carbsDelivered = detailedBolusInfo.carbs; pumpEnactResult.carbsDelivered = detailedBolusInfo.carbs;
pumpEnactResult.comment = MainApp.instance().getString(R.string.virtualpump_resultok); pumpEnactResult.comment = MainApp.instance().getString(R.string.virtualpump_resultok);
MainApp.getConfigBuilder().addToHistoryTreatment(detailedBolusInfo);
return pumpEnactResult; return pumpEnactResult;
} }
} else { } else {