fix double treatment upload from wizard
This commit is contained in:
parent
6c9c0d8223
commit
d85bb7db4d
2 changed files with 12 additions and 2 deletions
|
@ -337,7 +337,17 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
|||
insulin = applyBolusConstraints(insulin);
|
||||
carbs = applyCarbsConstraints(carbs);
|
||||
|
||||
PumpEnactResult result = deliverTreatment(insulin, carbs, context);
|
||||
BolusProgressDialog bolusProgressDialog = null;
|
||||
if (context != null) {
|
||||
bolusProgressDialog = new BolusProgressDialog(insulin);
|
||||
bolusProgressDialog.show(((AppCompatActivity) context).getSupportFragmentManager(), "BolusProgress");
|
||||
}
|
||||
|
||||
PumpEnactResult result = activePump.deliverTreatment(insulin, carbs, context);
|
||||
|
||||
if (bolusProgressDialog != null) {
|
||||
bolusProgressDialog.dismiss();
|
||||
}
|
||||
|
||||
if (Config.logCongigBuilderActions)
|
||||
log.debug("deliverTreatmentFromBolusWizard insulin: " + insulin + " carbs: " + carbs + " success: " + result.success + " enacted: " + result.enacted + " bolusDelivered: " + result.bolusDelivered);
|
||||
|
|
|
@ -83,7 +83,7 @@ public class WizardDialog extends DialogFragment implements OnClickListener {
|
|||
Context parentContext;
|
||||
|
||||
public WizardDialog(Context context) {
|
||||
mHandlerThread = new HandlerThread(NewExtendedBolusDialog.class.getSimpleName());
|
||||
mHandlerThread = new HandlerThread(WizardDialog.class.getSimpleName());
|
||||
mHandlerThread.start();
|
||||
mHandler = new Handler(mHandlerThread.getLooper());
|
||||
parentContext = context;
|
||||
|
|
Loading…
Reference in a new issue