From c181aaaf3429c889469eb9df4354127f7fd5e519 Mon Sep 17 00:00:00 2001 From: AdrianLxM Date: Wed, 11 Oct 2017 02:32:17 +0200 Subject: [PATCH] Basal sum in label --- .../java/info/nightscout/androidaps/db/ProfileSwitch.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/db/ProfileSwitch.java b/app/src/main/java/info/nightscout/androidaps/db/ProfileSwitch.java index 1d73016384..114f9b6874 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/ProfileSwitch.java +++ b/app/src/main/java/info/nightscout/androidaps/db/ProfileSwitch.java @@ -18,6 +18,8 @@ import info.nightscout.androidaps.interfaces.Interval; import info.nightscout.androidaps.plugins.Overview.graphExtensions.DataPointWithLabelInterface; import info.nightscout.androidaps.plugins.Overview.graphExtensions.PointsWithLabelGraphSeries; import info.nightscout.utils.DateUtil; +import info.nightscout.utils.DecimalFormatter; +import info.nightscout.utils.SafeParse; @DatabaseTable(tableName = DatabaseHelper.DATABASE_PROFILESWITCHES) public class ProfileSwitch implements Interval, DataPointWithLabelInterface { @@ -66,7 +68,7 @@ public class ProfileSwitch implements Interval, DataPointWithLabelInterface { } public String getCustomizedName() { - String name = profileName; + String name = DecimalFormatter.to2Decimal(getProfileObject().percentageBasalSum()) + "U/h "; if (isCPP) { name += "(" + percentage + "%," + timeshift + "h)"; } @@ -187,7 +189,7 @@ public class ProfileSwitch implements Interval, DataPointWithLabelInterface { @Override public String getLabel() { - return profileName; + return getCustomizedName(); } @Override