From c11455dff1f72ade66313b7725929141f5689aea Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Sat, 9 Sep 2017 01:31:24 +0200 Subject: [PATCH] Make the BolusProgress dialog a bit more self-contained. (cherry picked from commit 75db72a) --- .../plugins/ConfigBuilder/ConfigBuilderPlugin.java | 1 - .../plugins/Overview/Dialogs/BolusProgressDialog.java | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 aa603286f4..af5eeb6376 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 @@ -455,7 +455,6 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain result = activePump.deliverTreatment(detailedBolusInfo); - BolusProgressDialog.bolusEnded = true; MainApp.bus().post(new EventDismissBolusprogressIfRunning(result)); mWakeLock.release(); diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/BolusProgressDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/BolusProgressDialog.java index 192bffba3c..50a2a8b50f 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/BolusProgressDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/BolusProgressDialog.java @@ -33,8 +33,8 @@ public class BolusProgressDialog extends DialogFragment implements View.OnClickL BolusProgressHelperActivity helperActivity; static double amount; - public static boolean bolusEnded = false; - public static boolean running = true; + private static boolean bolusEnded = false; + private static boolean running = true; public BolusProgressDialog() { super(); @@ -124,6 +124,7 @@ public class BolusProgressDialog extends DialogFragment implements View.OnClickL @Subscribe public void onStatusEvent(final EventDismissBolusprogressIfRunning ev) { if(BolusProgressDialog.running){ + bolusEnded = true; dismiss(); } }