ObjectiveFragment
This commit is contained in:
parent
bc0ae1fa68
commit
4db9f3bd94
1 changed files with 6 additions and 7 deletions
|
@ -90,7 +90,6 @@ import info.nightscout.androidaps.plugins.bus.RxBusWrapper;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
import info.nightscout.androidaps.plugins.configBuilder.ConfigBuilderPlugin;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
import info.nightscout.androidaps.plugins.configBuilder.ConstraintChecker;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction;
|
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunction;
|
||||||
import info.nightscout.androidaps.plugins.configBuilder.ProfileFunctions;
|
|
||||||
import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus;
|
import info.nightscout.androidaps.plugins.general.nsclient.data.NSDeviceStatus;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity;
|
import info.nightscout.androidaps.plugins.general.overview.activities.QuickWizardListActivity;
|
||||||
import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData;
|
import info.nightscout.androidaps.plugins.general.overview.graphData.GraphData;
|
||||||
|
@ -788,7 +787,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
||||||
pvd.show(manager, "ProfileViewDialog");
|
pvd.show(manager, "ProfileViewDialog");
|
||||||
} else if (item.getTitle().equals(resourceHelper.gs(R.string.eatingsoon))) {
|
} else if (item.getTitle().equals(resourceHelper.gs(R.string.eatingsoon))) {
|
||||||
aapsLogger.debug("USER ENTRY: TEMP TARGET EATING SOON");
|
aapsLogger.debug("USER ENTRY: TEMP TARGET EATING SOON");
|
||||||
double target = Profile.toMgdl(defaultValueHelper.determineEatingSoonTT(), ProfileFunctions.getSystemUnits());
|
double target = Profile.toMgdl(defaultValueHelper.determineEatingSoonTT(), profileFunction.getUnits());
|
||||||
TempTarget tempTarget = new TempTarget()
|
TempTarget tempTarget = new TempTarget()
|
||||||
.date(System.currentTimeMillis())
|
.date(System.currentTimeMillis())
|
||||||
.duration(defaultValueHelper.determineEatingSoonTTDuration())
|
.duration(defaultValueHelper.determineEatingSoonTTDuration())
|
||||||
|
@ -799,7 +798,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
||||||
treatmentsPlugin.addToHistoryTempTarget(tempTarget);
|
treatmentsPlugin.addToHistoryTempTarget(tempTarget);
|
||||||
} else if (item.getTitle().equals(resourceHelper.gs(R.string.activity))) {
|
} else if (item.getTitle().equals(resourceHelper.gs(R.string.activity))) {
|
||||||
aapsLogger.debug("USER ENTRY: TEMP TARGET ACTIVITY");
|
aapsLogger.debug("USER ENTRY: TEMP TARGET ACTIVITY");
|
||||||
double target = Profile.toMgdl(defaultValueHelper.determineActivityTT(), ProfileFunctions.getSystemUnits());
|
double target = Profile.toMgdl(defaultValueHelper.determineActivityTT(), profileFunction.getUnits());
|
||||||
TempTarget tempTarget = new TempTarget()
|
TempTarget tempTarget = new TempTarget()
|
||||||
.date(now())
|
.date(now())
|
||||||
.duration(defaultValueHelper.determineActivityTTDuration())
|
.duration(defaultValueHelper.determineActivityTTDuration())
|
||||||
|
@ -810,7 +809,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
||||||
treatmentsPlugin.addToHistoryTempTarget(tempTarget);
|
treatmentsPlugin.addToHistoryTempTarget(tempTarget);
|
||||||
} else if (item.getTitle().equals(resourceHelper.gs(R.string.hypo))) {
|
} else if (item.getTitle().equals(resourceHelper.gs(R.string.hypo))) {
|
||||||
aapsLogger.debug("USER ENTRY: TEMP TARGET HYPO");
|
aapsLogger.debug("USER ENTRY: TEMP TARGET HYPO");
|
||||||
double target = Profile.toMgdl(defaultValueHelper.determineHypoTT(), ProfileFunctions.getSystemUnits());
|
double target = Profile.toMgdl(defaultValueHelper.determineHypoTT(), profileFunction.getUnits());
|
||||||
TempTarget tempTarget = new TempTarget()
|
TempTarget tempTarget = new TempTarget()
|
||||||
.date(now())
|
.date(now())
|
||||||
.duration(defaultValueHelper.determineHypoTTDuration())
|
.duration(defaultValueHelper.determineHypoTTDuration())
|
||||||
|
@ -1057,7 +1056,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
||||||
if (profile == null) return;
|
if (profile == null) return;
|
||||||
final String profileName = profileFunction.getProfileName();
|
final String profileName = profileFunction.getProfileName();
|
||||||
|
|
||||||
final String units = ProfileFunctions.getSystemUnits();
|
final String units = profileFunction.getUnits();
|
||||||
final double lowLine = defaultValueHelper.determineLowLine();
|
final double lowLine = defaultValueHelper.determineLowLine();
|
||||||
final double highLine = defaultValueHelper.determineHighLine();
|
final double highLine = defaultValueHelper.determineHighLine();
|
||||||
|
|
||||||
|
@ -1135,7 +1134,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
||||||
if (tempTarget != null) {
|
if (tempTarget != null) {
|
||||||
tempTargetView.setTextColor(resourceHelper.gc(R.color.ribbonTextWarning));
|
tempTargetView.setTextColor(resourceHelper.gc(R.color.ribbonTextWarning));
|
||||||
tempTargetView.setBackgroundColor(resourceHelper.gc(R.color.ribbonWarning));
|
tempTargetView.setBackgroundColor(resourceHelper.gc(R.color.ribbonWarning));
|
||||||
tempTargetView.setText(Profile.toTargetRangeString(tempTarget.low, tempTarget.high, Constants.MGDL, units) + " " + DateUtil.untilString(tempTarget.end()));
|
tempTargetView.setText(Profile.toTargetRangeString(tempTarget.low, tempTarget.high, Constants.MGDL, units) + " " + DateUtil.untilString(tempTarget.end(), resourceHelper));
|
||||||
} else {
|
} else {
|
||||||
tempTargetView.setTextColor(resourceHelper.gc(R.color.ribbonTextDefault));
|
tempTargetView.setTextColor(resourceHelper.gc(R.color.ribbonTextDefault));
|
||||||
tempTargetView.setBackgroundColor(resourceHelper.gc(R.color.ribbonDefault));
|
tempTargetView.setBackgroundColor(resourceHelper.gc(R.color.ribbonDefault));
|
||||||
|
@ -1204,7 +1203,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
baseBasalView.setTextColor(resourceHelper.gc(R.color.basal));
|
baseBasalView.setTextColor(resourceHelper.gc(R.color.basal));
|
||||||
} else {
|
} else {
|
||||||
baseBasalView.setTextColor(MainApp.gc(R.color.defaulttextcolor));
|
baseBasalView.setTextColor(resourceHelper.gc(R.color.defaulttextcolor));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue