diff --git a/app/build.gradle b/app/build.gradle index 86ee94c37..44896664a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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" diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt index bda098f47..af1699323 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/GradeAverageProvider.kt @@ -98,7 +98,7 @@ class GradeAverageProvider @Inject constructor( } private fun List.emulateEmptySummaries(student: Student, semester: Semester, grades: List>>, calcAverage: Boolean): List { - 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 } diff --git a/app/src/main/java/io/github/wulkanowy/utils/SdkExtension.kt b/app/src/main/java/io/github/wulkanowy/utils/SdkExtension.kt index e4d4163b4..63a30db8c 100644 --- a/app/src/main/java/io/github/wulkanowy/utils/SdkExtension.kt +++ b/app/src/main/java/io/github/wulkanowy/utils/SdkExtension.kt @@ -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