revert TRB displaying
This commit is contained in:
parent
1b4d06101d
commit
a5393eff84
|
@ -108,10 +108,6 @@ public class TemporaryBasal implements Interval, DbObjectBase {
|
||||||
this.pumpId = extendedBolus.pumpId;
|
this.pumpId = extendedBolus.pumpId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toDuration() {
|
|
||||||
return "(" + getRealDuration() + "/" + durationInMinutes + "')";
|
|
||||||
}
|
|
||||||
|
|
||||||
public TemporaryBasal clone() {
|
public TemporaryBasal clone() {
|
||||||
TemporaryBasal t = new TemporaryBasal();
|
TemporaryBasal t = new TemporaryBasal();
|
||||||
t.date = date;
|
t.date = date;
|
||||||
|
|
|
@ -182,7 +182,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
boolean smallWidth;
|
boolean smallWidth;
|
||||||
boolean smallHeight;
|
boolean smallHeight;
|
||||||
|
|
||||||
public static boolean shorttextmode = true;
|
public static boolean shorttextmode = false;
|
||||||
|
|
||||||
private boolean accepted;
|
private boolean accepted;
|
||||||
|
|
||||||
|
@ -1151,12 +1151,12 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
String basalText = "";
|
String basalText = "";
|
||||||
if (shorttextmode) {
|
if (shorttextmode) {
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
basalText = activeTemp.percentRate + "% " + activeTemp.toDuration() + " " + DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h";
|
basalText = "T: " + activeTemp.toStringVeryShort();
|
||||||
} else {
|
} else {
|
||||||
basalText = DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h";
|
basalText = MainApp.gs(R.string.pump_basebasalrate,profile.getBasal());
|
||||||
}
|
}
|
||||||
baseBasalView.setOnClickListener(v -> {
|
baseBasalView.setOnClickListener(v -> {
|
||||||
String fullText = MainApp.gs(R.string.pump_basebasalrate_label) + ": " + DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h\n";
|
String fullText = MainApp.gs(R.string.pump_basebasalrate_label) + ": " + MainApp.gs(R.string.pump_basebasalrate,profile.getBasal()) + "\n";
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
fullText += MainApp.gs(R.string.pump_tempbasal_label) + ": " + activeTemp.toStringFull();
|
fullText += MainApp.gs(R.string.pump_tempbasal_label) + ": " + activeTemp.toStringFull();
|
||||||
}
|
}
|
||||||
|
@ -1165,22 +1165,18 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
basalText = activeTemp.toStringFull() + " ";
|
basalText = activeTemp.toStringFull();
|
||||||
}
|
} else {
|
||||||
if (Config.NSCLIENT)
|
basalText = MainApp.gs(R.string.pump_basebasalrate,profile.getBasal());
|
||||||
basalText += "(" + DecimalFormatter.to2Decimal(profile.getBasal()) + " U/h)";
|
|
||||||
else if (pump.getPumpDescription().isTempBasalCapable) {
|
|
||||||
basalText += "(" + DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + "U/h)";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
baseBasalView.setText(basalText);
|
||||||
if (activeTemp != null) {
|
if (activeTemp != null) {
|
||||||
baseBasalView.setTextColor(MainApp.gc(R.color.basal));
|
baseBasalView.setTextColor(MainApp.gc(R.color.basal));
|
||||||
} else {
|
} else {
|
||||||
baseBasalView.setTextColor(android.R.attr.textColor);
|
baseBasalView.setTextColor(MainApp.gc(R.color.defaulttextcolor));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
baseBasalView.setText(basalText);
|
|
||||||
|
|
||||||
final ExtendedBolus extendedBolus = TreatmentsPlugin.getPlugin().getExtendedBolusFromHistory(System.currentTimeMillis());
|
final ExtendedBolus extendedBolus = TreatmentsPlugin.getPlugin().getExtendedBolusFromHistory(System.currentTimeMillis());
|
||||||
String extendedBolusText = "";
|
String extendedBolusText = "";
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
<color name="defaultbackground">#424242</color>
|
<color name="defaultbackground">#424242</color>
|
||||||
<color name="defaulttext">#BBBBBB</color>
|
<color name="defaulttext">#BBBBBB</color>
|
||||||
|
<color name="defaulttextcolor">#B3FFFFFF</color>
|
||||||
|
|
||||||
<color name="tempTargetBackground">#77dd77</color>
|
<color name="tempTargetBackground">#77dd77</color>
|
||||||
<color name="tempTargetConfirmation">#77dd77</color>
|
<color name="tempTargetConfirmation">#77dd77</color>
|
||||||
|
|
Loading…
Reference in a new issue