mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-23 22:56:23 -06:00
Fix item sorting in grades details (#209)
This commit is contained in:
parent
ca504f6efc
commit
450ae4e124
@ -97,6 +97,7 @@ class GradeDetailsPresenter @Inject constructor(
|
||||
disposable.add(studentRepository.getCurrentStudent()
|
||||
.flatMap { semesterRepository.getSemesters(it) }
|
||||
.flatMap { gradeRepository.getGrades(it.first { item -> item.semesterId == semesterId }, forceRefresh) }
|
||||
.map { it.sortedByDescending { grade -> grade.date } }
|
||||
.map { it.map { item -> item.changeModifier(preferencesRepository.gradePlusModifier, preferencesRepository.gradeMinusModifier) } }
|
||||
.map { createGradeItems(it.groupBy { grade -> grade.subject }.toSortedMap()) }
|
||||
.subscribeOn(schedulers.backgroundThread)
|
||||
|
Loading…
Reference in New Issue
Block a user