add invalid treatments to charts in "invalid" colour
This commit is contained in:
parent
6c899fbf5c
commit
3f8dea1197
2 changed files with 4 additions and 6 deletions
|
@ -8,8 +8,6 @@ import com.j256.ormlite.table.DatabaseTable;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import info.nightscout.androidaps.Constants;
|
import info.nightscout.androidaps.Constants;
|
||||||
|
@ -17,7 +15,6 @@ import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.data.Iob;
|
import info.nightscout.androidaps.data.Iob;
|
||||||
import info.nightscout.androidaps.interfaces.InsulinInterface;
|
import info.nightscout.androidaps.interfaces.InsulinInterface;
|
||||||
import info.nightscout.androidaps.plugins.ConfigBuilder.ConfigBuilderPlugin;
|
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.DataPointWithLabelInterface;
|
||||||
import info.nightscout.androidaps.plugins.Overview.graphExtensions.PointsWithLabelGraphSeries;
|
import info.nightscout.androidaps.plugins.Overview.graphExtensions.PointsWithLabelGraphSeries;
|
||||||
import info.nightscout.utils.DateUtil;
|
import info.nightscout.utils.DateUtil;
|
||||||
|
@ -170,7 +167,10 @@ public class Treatment implements DataPointWithLabelInterface {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getColor() {
|
public int getColor() {
|
||||||
return Color.CYAN;
|
if (isValid)
|
||||||
|
return Color.CYAN;
|
||||||
|
else
|
||||||
|
return MainApp.instance().getResources().getColor(android.R.color.holo_red_light);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1598,8 +1598,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
|
|
||||||
for (int tx = 0; tx < treatments.size(); tx++) {
|
for (int tx = 0; tx < treatments.size(); tx++) {
|
||||||
Treatment t = treatments.get(tx);
|
Treatment t = treatments.get(tx);
|
||||||
if (!t.isValid)
|
|
||||||
continue;
|
|
||||||
if (t.getX() < fromTime || t.getX() > endTime) continue;
|
if (t.getX() < fromTime || t.getX() > endTime) continue;
|
||||||
t.setY(getNearestBg((long) t.getX(), bgReadingsArray));
|
t.setY(getNearestBg((long) t.getX(), bgReadingsArray));
|
||||||
filteredTreatments.add(t);
|
filteredTreatments.add(t);
|
||||||
|
|
Loading…
Reference in a new issue