diff --git a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/summary/GradeSummaryPresenter.kt b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/summary/GradeSummaryPresenter.kt index 9b88689db..a61ad4af9 100644 --- a/app/src/main/java/io/github/wulkanowy/ui/modules/grade/summary/GradeSummaryPresenter.kt +++ b/app/src/main/java/io/github/wulkanowy/ui/modules/grade/summary/GradeSummaryPresenter.kt @@ -109,7 +109,17 @@ class GradeSummaryPresenter @Inject constructor( private fun createGradeSummaryItems(items: List): List { return items + .filter { !checkEmpty(it) } .sortedBy { it.subject } .map { it.summary.copy(average = it.average) } } + + private fun checkEmpty(gradeSummary: GradeDetailsWithAverage): Boolean { + return gradeSummary.run { + summary.finalGrade.isBlank() + && summary.predictedGrade.isBlank() + && average == .0 + && points == "-" + } + } }