From c384736840acf323613fbea599aff453dce31d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Tue, 17 Mar 2020 16:06:22 +0100 Subject: [PATCH] [Grades] Fix counting average without weight. --- .../szczodrzynski/edziennik/ui/modules/grades/GradesFragment.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/grades/GradesFragment.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/grades/GradesFragment.kt index d4eea3ba..ba125d9c 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/grades/GradesFragment.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/grades/GradesFragment.kt @@ -313,8 +313,6 @@ class GradesFragment : Fragment(), CoroutineScope { private fun countGrade(grade: Grade, averages: GradesAverages) { val value = manager.getGradeValue(grade) val weight = manager.getGradeWeight(dontCountEnabled, dontCountGrades, grade) - if (weight == 0f) - return when (grade.type) { Grade.TYPE_NORMAL -> { if (grade.value > 0f) {