TDD 09 - fix no data

This commit is contained in:
AdrianLxM 2018-03-19 21:13:50 +01:00
parent 088841ae23
commit 9177307c37

View file

@ -386,14 +386,9 @@ 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);
@ -435,7 +430,7 @@ public class TDDStatsActivity extends Activity {
tl.setBackgroundColor(Color.TRANSPARENT);
}
if(!historyList.isEmpty() && df.format(new Date(historyList.get(0).date)).equals(df.format(new Date()))) {
if(df.format(new Date(historyList.get(0).date)).equals(df.format(new Date()))) {
//Today should not be included
historyList.remove(0);
}