switch order of commands when setting superbolus
This commit is contained in:
parent
59de00d663
commit
60a41b7dce
1 changed files with 4 additions and 4 deletions
|
@ -330,6 +330,10 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Co
|
||||||
}
|
}
|
||||||
if (useSuperBolus) {
|
if (useSuperBolus) {
|
||||||
final LoopPlugin activeloop = MainApp.getConfigBuilder().getActiveLoop();
|
final LoopPlugin activeloop = MainApp.getConfigBuilder().getActiveLoop();
|
||||||
|
if (activeloop != null) {
|
||||||
|
activeloop.superBolusTo(new Date().getTime() + 2 * 60L * 60 * 1000);
|
||||||
|
MainApp.bus().post(new EventRefreshGui(false));
|
||||||
|
}
|
||||||
result = pump.setTempBasalAbsolute(0d, 120);
|
result = pump.setTempBasalAbsolute(0d, 120);
|
||||||
if (!result.success) {
|
if (!result.success) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||||
|
@ -338,10 +342,6 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Co
|
||||||
builder.setPositiveButton(MainApp.sResources.getString(R.string.ok), null);
|
builder.setPositiveButton(MainApp.sResources.getString(R.string.ok), null);
|
||||||
builder.show();
|
builder.show();
|
||||||
}
|
}
|
||||||
if (activeloop != null) {
|
|
||||||
activeloop.superBolusTo(new Date().getTime() + 2 * 60L * 60 * 1000);
|
|
||||||
MainApp.bus().post(new EventRefreshGui(false));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue