diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java index 9b999a4cf0..9bf0fa8ea8 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/ConfigBuilder/ConfigBuilderPlugin.java @@ -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); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java index 883b1f7646..1fdfd2a454 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/WizardDialog.java @@ -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;