diff --git a/app/src/main/java/info/nightscout/androidaps/db/Treatment.java b/app/src/main/java/info/nightscout/androidaps/db/Treatment.java index 971e1d55f1..78eee7f437 100644 --- a/app/src/main/java/info/nightscout/androidaps/db/Treatment.java +++ b/app/src/main/java/info/nightscout/androidaps/db/Treatment.java @@ -8,8 +8,6 @@ import com.j256.ormlite.table.DatabaseTable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.Date; -import java.util.List; import java.util.Objects; import info.nightscout.androidaps.Constants; @@ -17,7 +15,6 @@ import info.nightscout.androidaps.MainApp; import info.nightscout.androidaps.data.Iob; import info.nightscout.androidaps.interfaces.InsulinInterface; import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin; -import info.nightscout.androidaps.data.Profile; import info.nightscout.androidaps.plugins.Overview.graphExtensions.DataPointWithLabelInterface; import info.nightscout.androidaps.plugins.Overview.graphExtensions.PointsWithLabelGraphSeries; import info.nightscout.utils.DateUtil; @@ -170,7 +167,10 @@ public class Treatment implements DataPointWithLabelInterface { @Override public int getColor() { - return Color.CYAN; + if (isValid) + return Color.CYAN; + else + return MainApp.instance().getResources().getColor(android.R.color.holo_red_light); } @Override diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java index f50da429d7..edb9863a59 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/Overview/OverviewFragment.java @@ -1598,8 +1598,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener, for (int tx = 0; tx < treatments.size(); tx++) { Treatment t = treatments.get(tx); - if (!t.isValid) - continue; if (t.getX() < fromTime || t.getX() > endTime) continue; t.setY(getNearestBg((long) t.getX(), bgReadingsArray)); filteredTreatments.add(t);