ComboPlugin.deliverTreatment: don't update progress dialog for non-interactive SMBs.

This commit is contained in:
Johannes Mockenhaupt 2017-10-25 15:06:34 +02:00
parent 34861960ea
commit fa81f57d9f
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -384,7 +384,11 @@ public class ComboPlugin implements PluginBase, PumpInterface {
return basal; return basal;
} }
// TODO remove dep on BolusCommand private static BolusProgressReporter nullBolusProgressReporter = new BolusProgressReporter() {
@Override
public void report(State state, int percent, double delivered) {}
};
private static BolusProgressReporter bolusProgressReporter = private static BolusProgressReporter bolusProgressReporter =
new BolusProgressReporter() { new BolusProgressReporter() {
@Override @Override
@ -466,7 +470,8 @@ public class ComboPlugin implements PluginBase, PumpInterface {
CommandResult bolusCmdResult = runCommand("Bolusing", new CommandExecution() { CommandResult bolusCmdResult = runCommand("Bolusing", new CommandExecution() {
@Override @Override
public CommandResult execute() { public CommandResult execute() {
return ruffyScripter.deliverBolus(detailedBolusInfo.insulin, bolusProgressReporter); return ruffyScripter.deliverBolus(detailedBolusInfo.insulin,
detailedBolusInfo.isSMB ? nullBolusProgressReporter : bolusProgressReporter);
} }
}); });