mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-31 13:48:20 +01:00
[Grades] Fix counting average without weight.
This commit is contained in:
parent
507657f273
commit
c384736840
@ -313,8 +313,6 @@ class GradesFragment : Fragment(), CoroutineScope {
|
|||||||
private fun countGrade(grade: Grade, averages: GradesAverages) {
|
private fun countGrade(grade: Grade, averages: GradesAverages) {
|
||||||
val value = manager.getGradeValue(grade)
|
val value = manager.getGradeValue(grade)
|
||||||
val weight = manager.getGradeWeight(dontCountEnabled, dontCountGrades, grade)
|
val weight = manager.getGradeWeight(dontCountEnabled, dontCountGrades, grade)
|
||||||
if (weight == 0f)
|
|
||||||
return
|
|
||||||
when (grade.type) {
|
when (grade.type) {
|
||||||
Grade.TYPE_NORMAL -> {
|
Grade.TYPE_NORMAL -> {
|
||||||
if (grade.value > 0f) {
|
if (grade.value > 0f) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user