Merge pull request #1257 from jotomo/1254

Fix #1242 double mmol/l conversion.
This commit is contained in:
Milos Kozak 2018-07-25 10:29:13 +02:00 committed by GitHub
commit 87de4bce5b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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())