Merge pull request #1 from AdrianLxM/patch-19

Insight: add treatment to progress event
This commit is contained in:
Tebbe Ubben 2018-03-11 20:58:13 +01:00 committed by GitHub
commit d353a10187
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -497,7 +497,10 @@ public class InsightPumpPlugin implements PluginBase, PumpInterface, Constraints
if (result.success) { if (result.success) {
log("Success!"); log("Success!");
Treatment t = new Treatment();
t.isSMB = detailedBolusInfo.isSMB;
final EventOverviewBolusProgress bolusingEvent = EventOverviewBolusProgress.getInstance(); final EventOverviewBolusProgress bolusingEvent = EventOverviewBolusProgress.getInstance();
bolusingEvent.t = t;
bolusingEvent.status = String.format(MainApp.sResources.getString(R.string.bolusdelivered), detailedBolusInfo.insulin); bolusingEvent.status = String.format(MainApp.sResources.getString(R.string.bolusdelivered), detailedBolusInfo.insulin);
bolusingEvent.percent = 100; bolusingEvent.percent = 100;
MainApp.bus().post(bolusingEvent); MainApp.bus().post(bolusingEvent);