mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-23 11:46:03 -06:00
Fix showing summary summary for subjects without partial grades (#877)
This commit is contained in:
parent
eedaa63771
commit
30af77614e
@ -77,8 +77,8 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
viewBinding {
|
||||
enabled = true
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
@ -124,7 +124,7 @@ configurations.all {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "io.github.wulkanowy:sdk:0.18.3"
|
||||
implementation "io.github.wulkanowy:sdk:7dc0761"
|
||||
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
implementation "androidx.core:core-ktx:1.2.0"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user