ComboPlugin.deliverTreatment: don't update progress dialog for non-interactive SMBs.
This commit is contained in:
parent
34861960ea
commit
fa81f57d9f
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue