On bolus cancel request, cancel all boluses. Partially addresses #646.
This commit is contained in:
parent
7be418fdf2
commit
25aa6f859f
2 changed files with 7 additions and 1 deletions
|
@ -112,7 +112,7 @@ public class BolusProgressDialog extends DialogFragment implements View.OnClickL
|
|||
stopPressed = true;
|
||||
stopPressedView.setVisibility(View.VISIBLE);
|
||||
stopButton.setVisibility(View.INVISIBLE);
|
||||
ConfigBuilderPlugin.getActivePump().stopBolusDelivering();
|
||||
ConfigBuilderPlugin.getCommandQueue().cancelAllBoluses();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -213,6 +213,12 @@ public class CommandQueue {
|
|||
return true;
|
||||
}
|
||||
|
||||
public synchronized void cancelAllBoluses() {
|
||||
removeAll(Command.CommandType.BOLUS);
|
||||
removeAll(Command.CommandType.SMB_BOLUS);
|
||||
ConfigBuilderPlugin.getActivePump().stopBolusDelivering();
|
||||
}
|
||||
|
||||
// returns true if command is queued
|
||||
public boolean tempBasalAbsolute(double absoluteRate, int durationInMinutes, boolean enforceNew, Profile profile, Callback callback) {
|
||||
if (!enforceNew && isRunning(Command.CommandType.TEMPBASAL)) {
|
||||
|
|
Loading…
Reference in a new issue