From 2ab0dd75460cda161448cef917e7cf0a2d9afe6d Mon Sep 17 00:00:00 2001 From: "B.O.S.S" Date: Thu, 16 Dec 2021 12:23:33 +0100 Subject: [PATCH] [API/Librus] Revert getting time in teacher free days. (#124) --- .../edziennik/librus/data/api/LibrusApiTeacherFreeDays.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/data/api/LibrusApiTeacherFreeDays.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/data/api/LibrusApiTeacherFreeDays.kt index 9ed38834..09ed5416 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/data/api/LibrusApiTeacherFreeDays.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/librus/data/api/LibrusApiTeacherFreeDays.kt @@ -38,6 +38,8 @@ class LibrusApiTeacherFreeDays(override val data: DataLibrus, ?: return@forEach val dateFrom = Date.fromY_m_d(teacherAbsence.getString("DateFrom")) val dateTo = Date.fromY_m_d(teacherAbsence.getString("DateTo")) + val timeFrom = teacherAbsence.getString("TimeFrom")?.let { Time.fromH_m_s(it) } + val timeTo = teacherAbsence.getString("TimeTo")?.let { Time.fromH_m_s(it) } val teacherAbsenceObject = TeacherAbsence( profileId = profileId, @@ -46,8 +48,8 @@ class LibrusApiTeacherFreeDays(override val data: DataLibrus, name = null, dateFrom = dateFrom, dateTo = dateTo, - timeFrom = null, - timeTo = null, + timeFrom = timeFrom, + timeTo = timeTo, teacherId = teacherId )