diff --git a/app/src/main/java/info/nightscout/androidaps/TDDStatsActivity.java b/app/src/main/java/info/nightscout/androidaps/TDDStatsActivity.java index 4f38490686..48ae30f6d2 100644 --- a/app/src/main/java/info/nightscout/androidaps/TDDStatsActivity.java +++ b/app/src/main/java/info/nightscout/androidaps/TDDStatsActivity.java @@ -386,9 +386,14 @@ public class TDDStatsActivity extends Activity { TableLayout.LayoutParams.MATCH_PARENT, TableLayout.LayoutParams.WRAP_CONTENT)); - sum = sum + tdd; + i++; + if(df.format(new Date(historyList.get(0).date)).equals(df.format(new Date()))) { + break; + } + + sum = sum + tdd; // Create the cumtable row TableRow ctr = new TableRow(TDDStatsActivity.this); if (i % 2 == 0) ctr.setBackgroundColor(Color.DKGRAY);