reduced if...else to single line as Adrian suggested
This commit is contained in:
parent
ea29b6ad82
commit
6443502808
1 changed files with 3 additions and 7 deletions
|
@ -260,13 +260,9 @@ public class NewCarbsDialog extends DialogFragment implements OnClickListener, D
|
|||
Profile currentProfile = MainApp.getConfigBuilder().getProfile();
|
||||
if(currentProfile == null)
|
||||
return;
|
||||
if(currentProfile.getUnits().equals(Constants.MMOL)) {
|
||||
esTT = eatingSoonTT > 0 ? Profile.toMgdl(eatingSoonTT,Constants.MMOL) : 90d;
|
||||
activityTT = prefTT > 0 ? Profile.toMgdl(prefTT,Constants.MMOL) : 140d;
|
||||
} else {
|
||||
esTT = eatingSoonTT > 0 ? eatingSoonTT : 90d;
|
||||
activityTT = prefTT > 0 ? prefTT : 140d;
|
||||
}
|
||||
|
||||
esTT = eatingSoonTT > 0 ? Profile.toMgdl(eatingSoonTT,currentProfile.getUnits()) : 90d;
|
||||
activityTT = prefTT > 0 ? Profile.toMgdl(prefTT,currentProfile.getUnits()) : 140d;
|
||||
|
||||
if (startActivityTTCheckbox.isChecked()) {
|
||||
if(currentProfile.getUnits().equals(Constants.MMOL)) {
|
||||
|
|
Loading…
Reference in a new issue