From 74820fe67d36004f559ed82a60517be83d2a2080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Fri, 26 Feb 2021 23:04:25 +0100 Subject: [PATCH] [Mobidziennik/Web] Fix counting e-attendance. --- .../data/web/MobidziennikWebAttendance.kt | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/mobidziennik/data/web/MobidziennikWebAttendance.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/mobidziennik/data/web/MobidziennikWebAttendance.kt index 349c2ea7..7fb74914 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/mobidziennik/data/web/MobidziennikWebAttendance.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/mobidziennik/data/web/MobidziennikWebAttendance.kt @@ -188,22 +188,18 @@ class MobidziennikWebAttendance(override val data: DataMobidziennik, } entry = entry.removePrefix(typeSymbol) - var isCounted = true + val isCounted = true val baseType = when (typeSymbol) { "." -> TYPE_PRESENT "|" -> TYPE_ABSENT "+" -> TYPE_ABSENT_EXCUSED "s" -> TYPE_BELATED "z" -> TYPE_RELEASED - else -> { - isCounted = false - when (typeSymbol) { - "e" -> TYPE_PRESENT_CUSTOM - "en" -> TYPE_ABSENT - "ep" -> TYPE_PRESENT_CUSTOM - else -> TYPE_UNKNOWN - } - } + "e" -> TYPE_PRESENT_CUSTOM + "en" -> TYPE_ABSENT + "ep" -> TYPE_PRESENT_CUSTOM + "+ₑ" -> TYPE_ABSENT_EXCUSED + else -> TYPE_UNKNOWN } val typeName = types?.get(typeSymbol) ?: "" val typeColor = when (typeSymbol) {