mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-24 05:26:11 -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()
|
disposable.add(studentRepository.getCurrentStudent()
|
||||||
.flatMap { semesterRepository.getSemesters(it) }
|
.flatMap { semesterRepository.getSemesters(it) }
|
||||||
.flatMap { gradeRepository.getGrades(it.first { item -> item.semesterId == semesterId }, forceRefresh) }
|
.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 { it.map { item -> item.changeModifier(preferencesRepository.gradePlusModifier, preferencesRepository.gradeMinusModifier) } }
|
||||||
.map { createGradeItems(it.groupBy { grade -> grade.subject }.toSortedMap()) }
|
.map { createGradeItems(it.groupBy { grade -> grade.subject }.toSortedMap()) }
|
||||||
.subscribeOn(schedulers.backgroundThread)
|
.subscribeOn(schedulers.backgroundThread)
|
||||||
|
Loading…
Reference in New Issue
Block a user