default constructor only in BolusProgressDialog

This commit is contained in:
Milos Kozak 2016-10-21 21:50:21 +02:00
parent f167174151
commit 8d05845c4f
2 changed files with 5 additions and 3 deletions

View file

@ -349,7 +349,8 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
BolusProgressDialog bolusProgressDialog = null; BolusProgressDialog bolusProgressDialog = null;
if (context != null) { if (context != null) {
bolusProgressDialog = new BolusProgressDialog(insulin); bolusProgressDialog = new BolusProgressDialog();
bolusProgressDialog.setInsulin(insulin);
bolusProgressDialog.show(((AppCompatActivity) context).getSupportFragmentManager(), "BolusProgress"); bolusProgressDialog.show(((AppCompatActivity) context).getSupportFragmentManager(), "BolusProgress");
} }
@ -393,7 +394,8 @@ public class ConfigBuilderPlugin implements PluginBase, PumpInterface, Constrain
BolusProgressDialog bolusProgressDialog = null; BolusProgressDialog bolusProgressDialog = null;
if (context != null) { if (context != null) {
bolusProgressDialog = new BolusProgressDialog(insulin); bolusProgressDialog = new BolusProgressDialog();
bolusProgressDialog.setInsulin(insulin);
bolusProgressDialog.show(((AppCompatActivity) context).getSupportFragmentManager(), "BolusProgress"); bolusProgressDialog.show(((AppCompatActivity) context).getSupportFragmentManager(), "BolusProgress");
} }

View file

@ -40,7 +40,7 @@ public class BolusProgressDialog extends DialogFragment implements View.OnClickL
super(); super();
} }
public BolusProgressDialog(double amount) { public void setInsulin(double amount) {
this.amount = amount; this.amount = amount;
bolusEnded = false; bolusEnded = false;
} }