temp fix of bolus progress crash
This commit is contained in:
parent
38ee1402a4
commit
08d940b2fb
|
@ -351,9 +351,9 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
|||
|
||||
PumpEnactResult result = activePump.deliverTreatment(insulin, carbs, context);
|
||||
|
||||
bolusProgressDialog.bolusEnded = true;
|
||||
BolusProgressDialog.bolusEnded = true;
|
||||
|
||||
if (bolusProgressDialog != null && bolusProgressDialog.running) {
|
||||
if (bolusProgressDialog != null && BolusProgressDialog.running) {
|
||||
try {
|
||||
bolusProgressDialog.dismiss();
|
||||
} catch (Exception e) {
|
||||
|
@ -393,9 +393,9 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
|
|||
|
||||
PumpEnactResult result = activePump.deliverTreatment(insulin, carbs, context);
|
||||
|
||||
bolusProgressDialog.bolusEnded = true;
|
||||
BolusProgressDialog.bolusEnded = true;
|
||||
|
||||
if (bolusProgressDialog != null && bolusProgressDialog.running) {
|
||||
if (bolusProgressDialog != null && BolusProgressDialog.running) {
|
||||
try {
|
||||
bolusProgressDialog.dismiss();
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -146,13 +146,18 @@ public class BolusProgressDialog extends DialogFragment implements View.OnClickL
|
|||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
BolusProgressDialog.bolusEnded = true;
|
||||
Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
activity.runOnUiThread(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
dismiss();
|
||||
try {
|
||||
dismiss();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace(); // TODO: do this better way
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue