Merge branch 'dev' into dagger3

This commit is contained in:
Milos Kozak 2020-01-03 22:58:33 +01:00
commit 0ea47a333c
3 changed files with 10 additions and 17 deletions

View file

@ -108,10 +108,6 @@ public class TemporaryBasal implements Interval, DbObjectBase {
this.pumpId = extendedBolus.pumpId;
}
public String toDuration() {
return "(" + getRealDuration() + "/" + durationInMinutes + "')";
}
public TemporaryBasal clone() {
TemporaryBasal t = new TemporaryBasal();
t.date = date;

View file

@ -204,7 +204,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
boolean smallWidth;
boolean smallHeight;
public static boolean shorttextmode = true;
public static boolean shorttextmode = false;
private boolean accepted;
@ -1165,12 +1165,12 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
String basalText = "";
if (shorttextmode) {
if (activeTemp != null) {
basalText = activeTemp.percentRate + "% " + activeTemp.toDuration() + " " + DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h";
basalText = "T: " + activeTemp.toStringVeryShort();
} else {
basalText = DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h";
basalText = MainApp.gs(R.string.pump_basebasalrate,profile.getBasal());
}
baseBasalView.setOnClickListener(v -> {
String fullText = resourceHelper.gs(R.string.pump_basebasalrate_label) + ": " + DecimalFormatter.to2Decimal(profile.getBasal()) + "U/h\n";
String fullText = resourceHelper.gs(R.string.pump_basebasalrate_label) + ": " + resourceHelper.gs(R.string.pump_basebasalrate,profile.getBasal()) + "\n";
if (activeTemp != null) {
fullText += resourceHelper.gs(R.string.pump_tempbasal_label) + ": " + activeTemp.toStringFull();
}
@ -1179,22 +1179,18 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
} else {
if (activeTemp != null) {
basalText = activeTemp.toStringFull() + " ";
}
if (Config.NSCLIENT)
basalText += "(" + DecimalFormatter.to2Decimal(profile.getBasal()) + " U/h)";
else if (pump.getPumpDescription().isTempBasalCapable) {
basalText += "(" + DecimalFormatter.to2Decimal(pump.getBaseBasalRate()) + "U/h)";
basalText = activeTemp.toStringFull();
} else {
basalText = resourceHelper.gs(R.string.pump_basebasalrate,profile.getBasal());
}
}
baseBasalView.setText(basalText);
if (activeTemp != null) {
baseBasalView.setTextColor(resourceHelper.gc(R.color.basal));
} else {
baseBasalView.setTextColor(android.R.attr.textColor);
baseBasalView.setTextColor(MainApp.gc(R.color.defaulttextcolor));
}
baseBasalView.setText(basalText);
final ExtendedBolus extendedBolus = treatmentsPlugin.getExtendedBolusFromHistory(System.currentTimeMillis());
String extendedBolusText = "";

View file

@ -33,6 +33,7 @@
<color name="defaultbackground">#424242</color>
<color name="defaulttext">#BBBBBB</color>
<color name="defaulttextcolor">#B3FFFFFF</color>
<color name="tempTargetBackground">#77dd77</color>
<color name="tempTargetConfirmation">#77dd77</color>