format using the Profile class method and Constants

This commit is contained in:
PoweRGbg 2018-03-01 18:40:06 +02:00
parent c6a46129df
commit 2fb0e6edc1

View file

@ -256,7 +256,7 @@ public class NewInsulinDialog extends DialogFragment implements OnClickListener,
final double finalTT = tt; final double finalTT = tt;
if (startESMCheckbox.isChecked()) { if (startESMCheckbox.isChecked()) {
if(currentProfile.getUnits().equals("mmol")){ if(currentProfile.getUnits().equals("mmol")){
confirmMessage += "<br/>" + "TT: " + "<font color='" + MainApp.sResources.getColor(R.color.high) + "'>" + Profile.toMmol(tt, Constants.MMOL) + "mmol for " + ((int) ttDuration) + " min </font>"; confirmMessage += "<br/>" + "TT: " + "<font color='" + MainApp.sResources.getColor(R.color.high) + "'>" + Profile.toMmol(tt, Constants.MGDL) + " mmol 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>";
} }