From b3a10b47ce5ffc5bddfc6508a0e12b053daede0b Mon Sep 17 00:00:00 2001 From: PoweRGbg Date: Thu, 1 Mar 2018 21:57:30 +0200 Subject: [PATCH] undo the RadioButton tests --- .../plugins/Overview/Dialogs/NewCarbsDialog.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java index 45b73762c5..cf9a765617 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/Dialogs/NewCarbsDialog.java @@ -72,8 +72,8 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D private static final double FAV2_DEFAULT = 10; private static final double FAV3_DEFAULT = 20; private CheckBox suspendLoopCheckbox; - private RadioButton startActivityTTCheckbox; - private RadioButton ESMCheckbox; + private CheckBox startActivityTTCheckbox; + private CheckBox ESMCheckbox; private Integer maxCarbs; @@ -258,16 +258,14 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D tt = prefTT > 0 ? prefTT : 140d; - if (startActivityTTCheckbox.isChecked() ||(startActivityTTCheckbox.isChecked() && ESMCheckbox.isChecked()) ) { - ESMCheckbox.setChecked(true); + if (startActivityTTCheckbox.isChecked()) { if(currentProfile.getUnits().equals(Constants.MMOL)) { confirmMessage += "
" + "TT: " + "" + Profile.toMmol(tt,Constants.MGDL) + " mmol/l for " + ((int) ttDuration) + " min "; } else confirmMessage += "
" + "TT: " + "" + ((int) tt) + " mg/dl for " + ((int) ttDuration) + " min "; } - if (ESMCheckbox.isChecked()) { - startActivityTTCheckbox.setChecked(true); + if (ESMCheckbox.isChecked() && !startActivityTTCheckbox.isChecked()) { if(currentProfile.getUnits().equals(Constants.MMOL)) { confirmMessage += "
" + "TT: " + "" + Profile.toMmol(esTT,Constants.MGDL) + " mmol/l for " + ((int) esDuration) + " min "; } else