Context TT menu fixes.
Default values where previously correctly converted for mmol/l, but user-defined settings in the prefs (in mmol/l) where not. This works for default settings and user-defined preference for both mg/dl as well as mmol/l.
This commit is contained in:
parent
1c7777e5eb
commit
27cf03f39a
1 changed files with 7 additions and 7 deletions
|
@ -592,8 +592,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
.duration(defHelper.determineEatingSoonTTDuration())
|
||||
.reason(MainApp.gs(R.string.eatingsoon))
|
||||
.source(Source.USER)
|
||||
.low(target)
|
||||
.high(target);
|
||||
.low(Profile.toMgdl(target, profile.getUnits()))
|
||||
.high(Profile.toMgdl(target, profile.getUnits()));
|
||||
TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget);
|
||||
} else if (item.getTitle().equals(MainApp.gs(R.string.activity))) {
|
||||
DefaultValueHelper defHelper = new DefaultValueHelper();
|
||||
|
@ -603,8 +603,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
.duration(defHelper.determineActivityTTDuration())
|
||||
.reason(MainApp.gs(R.string.activity))
|
||||
.source(Source.USER)
|
||||
.low(target)
|
||||
.high(target);
|
||||
.low(Profile.toMgdl(target, profile.getUnits()))
|
||||
.high(Profile.toMgdl(target, profile.getUnits()));
|
||||
TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget);
|
||||
} else if (item.getTitle().equals(MainApp.gs(R.string.hypo))) {
|
||||
DefaultValueHelper defHelper = new DefaultValueHelper();
|
||||
|
@ -612,10 +612,10 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
TempTarget tempTarget = new TempTarget()
|
||||
.date(now())
|
||||
.duration(defHelper.determineHypoTTDuration())
|
||||
.reason(MainApp.gs(R.string.activity))
|
||||
.reason(MainApp.gs(R.string.hypo))
|
||||
.source(Source.USER)
|
||||
.low(target)
|
||||
.high(target);
|
||||
.low(Profile.toMgdl(target, profile.getUnits()))
|
||||
.high(Profile.toMgdl(target, profile.getUnits()));
|
||||
TreatmentsPlugin.getPlugin().addToHistoryTempTarget(tempTarget);
|
||||
} else if (item.getTitle().equals(MainApp.gs(R.string.custom))) {
|
||||
NewNSTreatmentDialog newTTDialog = new NewNSTreatmentDialog();
|
||||
|
|
Loading…
Reference in a new issue