From a11a44b7688754c4cb7a4a04788266085b5f9912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Sun, 21 Feb 2021 23:30:20 +0100 Subject: [PATCH] [Vulcan/Hebe] Add handling custom presence types. --- .../api/edziennik/vulcan/data/hebe/VulcanHebeAttendance.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/hebe/VulcanHebeAttendance.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/hebe/VulcanHebeAttendance.kt index b1224334..3d207388 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/hebe/VulcanHebeAttendance.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/hebe/VulcanHebeAttendance.kt @@ -132,7 +132,10 @@ class VulcanHebeAttendance( else if (released) Attendance.TYPE_RELEASED else if (present) - Attendance.TYPE_PRESENT + if (attendanceType.getInt("CategoryId") != 1) + Attendance.TYPE_PRESENT_CUSTOM + else + Attendance.TYPE_PRESENT else Attendance.TYPE_UNKNOWN }