Merge pull request #1316 from jotomo/fixingthefix
TT context menu fixes
This commit is contained in:
commit
9dde50f93f
1 changed files with 10 additions and 10 deletions
|
@ -586,36 +586,36 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
pvd.show(manager, "ProfileViewDialog");
|
||||
} else if (item.getTitle().equals(MainApp.gs(R.string.eatingsoon))) {
|
||||
DefaultValueHelper defHelper = new DefaultValueHelper();
|
||||
double target = defHelper.determineEatingSoonTT(Constants.MGDL);
|
||||
double target = defHelper.determineEatingSoonTT(profile.getUnits());
|
||||
TempTarget tempTarget = new TempTarget()
|
||||
.date(System.currentTimeMillis())
|
||||
.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();
|
||||
double target = defHelper.determineActivityTT(Constants.MGDL);
|
||||
double target = defHelper.determineActivityTT(profile.getUnits());
|
||||
TempTarget tempTarget = new TempTarget()
|
||||
.date(now())
|
||||
.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();
|
||||
double target = defHelper.determineHypoTT(Constants.MGDL);
|
||||
double target = defHelper.determineHypoTT(profile.getUnits());
|
||||
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