forked from github/wulkanowy-mirror
Remove Zachowanie from all count of subjects (#1447)
This commit is contained in:
parent
2979d8b62a
commit
a6a2bcff3b
@ -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
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@
|
||||
<string name="grade_summary_predicted_grade">Predicted grade</string>
|
||||
<string name="grade_summary_calculated_average">Calculated average</string>
|
||||
<string name="grade_summary_final_average">Final average</string>
|
||||
<string name="grade_summary_from_subjects">From %1$d of %2$d subjects</string>
|
||||
<string name="grade_summary_from_subjects">from %1$d of %2$d subjects</string>
|
||||
<string name="grade_menu_summary">Summary</string>
|
||||
<string name="grade_menu_statistics">Class</string>
|
||||
<string name="grade_menu_read">Mark as read</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user