Fix #1254 double mmol/l conversion.

This commit is contained in:
Johannes Mockenhaupt 2018-07-24 19:11:58 +02:00
parent 026c9f4788
commit 0b280ce4d4
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -590,7 +590,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
pvd.show(manager, "ProfileViewDialog"); pvd.show(manager, "ProfileViewDialog");
} else if (item.getTitle().equals(MainApp.gs(R.string.eatingsoon))) { } else if (item.getTitle().equals(MainApp.gs(R.string.eatingsoon))) {
DefaultValueHelper defHelper = new DefaultValueHelper(); DefaultValueHelper defHelper = new DefaultValueHelper();
double target = defHelper.determineEatingSoonTT(profile.getUnits()); double target = defHelper.determineEatingSoonTT(Constants.MGDL);
TempTarget tempTarget = new TempTarget() TempTarget tempTarget = new TempTarget()
.date(System.currentTimeMillis()) .date(System.currentTimeMillis())
.duration(defHelper.determineEatingSoonTTDuration()) .duration(defHelper.determineEatingSoonTTDuration())
@ -601,7 +601,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget); TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget);
} else if (item.getTitle().equals(MainApp.gs(R.string.activity))) { } else if (item.getTitle().equals(MainApp.gs(R.string.activity))) {
DefaultValueHelper defHelper = new DefaultValueHelper(); DefaultValueHelper defHelper = new DefaultValueHelper();
double target = defHelper.determineActivityTT(profile.getUnits()); double target = defHelper.determineActivityTT(Constants.MGDL);
TempTarget tempTarget = new TempTarget() TempTarget tempTarget = new TempTarget()
.date(now()) .date(now())
.duration(defHelper.determineActivityTTDuration()) .duration(defHelper.determineActivityTTDuration())
@ -612,7 +612,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget); TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget);
} else if (item.getTitle().equals(MainApp.gs(R.string.hypo))) { } else if (item.getTitle().equals(MainApp.gs(R.string.hypo))) {
DefaultValueHelper defHelper = new DefaultValueHelper(); DefaultValueHelper defHelper = new DefaultValueHelper();
double target = defHelper.determineHypoTT(profile.getUnits()); double target = defHelper.determineHypoTT(Constants.MGDL);
TempTarget tempTarget = new TempTarget() TempTarget tempTarget = new TempTarget()
.date(now()) .date(now())
.duration(defHelper.determineHypoTTDuration()) .duration(defHelper.determineHypoTTDuration())