undo the RadioButton tests

This commit is contained in:
PoweRGbg 2018-03-01 21:57:30 +02:00
parent 3edec79b8d
commit b3a10b47ce

View file

@ -72,8 +72,8 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
private static final double FAV2_DEFAULT = 10; private static final double FAV2_DEFAULT = 10;
private static final double FAV3_DEFAULT = 20; private static final double FAV3_DEFAULT = 20;
private CheckBox suspendLoopCheckbox; private CheckBox suspendLoopCheckbox;
private RadioButton startActivityTTCheckbox; private CheckBox startActivityTTCheckbox;
private RadioButton ESMCheckbox; private CheckBox ESMCheckbox;
private Integer maxCarbs; private Integer maxCarbs;
@ -258,16 +258,14 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
tt = prefTT > 0 ? prefTT : 140d; tt = prefTT > 0 ? prefTT : 140d;
if (startActivityTTCheckbox.isChecked() ||(startActivityTTCheckbox.isChecked() && ESMCheckbox.isChecked()) ) { if (startActivityTTCheckbox.isChecked()) {
ESMCheckbox.setChecked(true);
if(currentProfile.getUnits().equals(Constants.MMOL)) { if(currentProfile.getUnits().equals(Constants.MMOL)) {
confirmMessage += "<br/>" + "TT: " + "<font color='" + MainApp.sResources.getColor(R.color.high) + "'>" + Profile.toMmol(tt,Constants.MGDL) + " mmol/l for " + ((int) ttDuration) + " min </font>"; confirmMessage += "<br/>" + "TT: " + "<font color='" + MainApp.sResources.getColor(R.color.high) + "'>" + Profile.toMmol(tt,Constants.MGDL) + " mmol/l for " + ((int) ttDuration) + " min </font>";
} else } else
confirmMessage += "<br/>" + "TT: " + "<font color='" + MainApp.sResources.getColor(R.color.high) + "'>" + ((int) tt) + " mg/dl for " + ((int) ttDuration) + " min </font>"; confirmMessage += "<br/>" + "TT: " + "<font color='" + MainApp.sResources.getColor(R.color.high) + "'>" + ((int) tt) + " mg/dl for " + ((int) ttDuration) + " min </font>";
} }
if (ESMCheckbox.isChecked()) { if (ESMCheckbox.isChecked() && !startActivityTTCheckbox.isChecked()) {
startActivityTTCheckbox.setChecked(true);
if(currentProfile.getUnits().equals(Constants.MMOL)) { if(currentProfile.getUnits().equals(Constants.MMOL)) {
confirmMessage += "<br/>" + "TT: " + "<font color='" + MainApp.sResources.getColor(R.color.low) + "'>" + Profile.toMmol(esTT,Constants.MGDL) + " mmol/l for " + ((int) esDuration) + " min </font>"; confirmMessage += "<br/>" + "TT: " + "<font color='" + MainApp.sResources.getColor(R.color.low) + "'>" + Profile.toMmol(esTT,Constants.MGDL) + " mmol/l for " + ((int) esDuration) + " min </font>";
} else } else