Fix showing summary summary for subjects without partial grades (#877)
This commit is contained in:
@ -98,7 +98,7 @@ class GradeAverageProvider @Inject constructor(
|
||||
}
|
||||
|
||||
private fun List<GradeSummary>.emulateEmptySummaries(student: Student, semester: Semester, grades: List<Pair<String, List<Grade>>>, calcAverage: Boolean): List<GradeSummary> {
|
||||
if (isNotEmpty() && size == grades.size) return this
|
||||
if (isNotEmpty() && size > grades.size) return this
|
||||
|
||||
return grades.mapIndexed { i, (subject, details) ->
|
||||
singleOrNull { it.subject == subject }?.let { return@mapIndexed it }
|
||||
|
@ -23,6 +23,8 @@ fun Sdk.init(student: Student): Sdk {
|
||||
certKey = student.certificateKey
|
||||
privateKey = student.privateKey
|
||||
|
||||
emptyCookieJarInterceptor = true
|
||||
|
||||
Timber.d("Sdk in ${student.loginMode} mode reinitialized")
|
||||
|
||||
return this
|
||||
|
Reference in New Issue
Block a user