diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/summary/GradeSummaryAdapter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/summary/GradeSummaryAdapter.kt
index 9a888ddc..0754361c 100644
--- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/summary/GradeSummaryAdapter.kt
+++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/summary/GradeSummaryAdapter.kt
@@ -59,6 +59,7 @@ class GradeSummaryAdapter @Inject constructor(
val context = binding.root.context
val finalItemsCount = items.count { it.finalGrade.matches("[0-6][+-]?".toRegex()) }
val calculatedItemsCount = items.count { value -> value.average != 0.0 }
+ val allItemsCount = items.count { !it.subject.equals("zachowanie", true) }
val finalAverage = items.calcAverage(
preferencesRepository.gradePlusModifier,
preferencesRepository.gradeMinusModifier
@@ -72,11 +73,15 @@ class GradeSummaryAdapter @Inject constructor(
gradeSummaryScrollableHeaderFinal.text = formatAverage(finalAverage)
gradeSummaryScrollableHeaderCalculated.text = formatAverage(calculatedAverage)
gradeSummaryScrollableHeaderFinalSubjectCount.text =
- context.getString(R.string.grade_summary_from_subjects, finalItemsCount, items.size)
+ context.getString(
+ R.string.grade_summary_from_subjects,
+ finalItemsCount,
+ allItemsCount
+ )
gradeSummaryScrollableHeaderCalculatedSubjectCount.text = context.getString(
R.string.grade_summary_from_subjects,
calculatedItemsCount,
- items.size
+ allItemsCount
)
}
}
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index b655769d..ee911cfb 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -101,7 +101,7 @@
Predicted grade
Calculated average
Final average
- From %1$d of %2$d subjects
+ from %1$d of %2$d subjects
Summary
Class
Mark as read