Only one TT can be selected

This commit is contained in:
Roumen Georgiev 2018-03-02 10:12:05 +02:00
parent b3a10b47ce
commit ab39536876

View file

@ -141,6 +141,10 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
dateButton.setOnClickListener(this);
timeButton.setOnClickListener(this);
//To be able to select only one TT at a time
ESMCheckbox.setOnClickListener(this);
startActivityTTCheckbox.setOnClickListener(this);
// TODO prefilling carbs, maybe
// TODO maybe update suggested carbs to target TT when checked
// APSResult lastAPSResult = ConfigBuilderPlugin.getActiveAPS().getLastAPSResult();
@ -213,6 +217,12 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
+ SP.getDouble(MainApp.gs(R.string.key_carbs_button_increment_3), FAV3_DEFAULT));
validateInputs();
break;
case R.id.newcarbs_activity_tt:
ESMCheckbox.setChecked(false);
break;
case R.id.carbs_eating_soon_tt:
startActivityTTCheckbox.setChecked(false);
break;
}
}