recyclerView.setAdapter(adapter);
final Map<String, GradeHeaderItem> headers = new HashMap<>();
EntityDataStore<Persistable> data = MainApplication.getData();
List<Subject> subjects = data.select(Subject.class).get().toList();
for (Subject s : subjects) {
<BUG>Average average = null;
headers.put(s.id(), new GradeHeaderItem(s, average));</BUG>
}
List<Grade> grades = data.select(Grade.class)
.orderBy(GradeType.DATE.desc())

recyclerView.setAdapter(adapter);
final Map<String, GradeHeaderItem> headers = new HashMap<>();
EntityDataStore<Persistable> data = MainApplication.getData();
List<Subject> subjects = data.select(Subject.class).get().toList();
for (Subject s : subjects) {
Average average = MainApplication.getData()
.select(Average.class)
.where(AverageType.SUBJECT_ID.eq(s.id()))
.get()
.firstOrNull();
headers.put(s.id(), new GradeHeaderItem(s, average));
}
List<Grade> grades = data.select(Grade.class)
.orderBy(GradeType.DATE.desc())
