From 8fc57cd3f5567f0f4e9e40ddb8dcc5374216b2d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Sun, 21 Feb 2021 17:22:21 +0100 Subject: [PATCH] [Vulcan/Hebe] Fix getting classroom name. --- .../api/edziennik/vulcan/data/hebe/VulcanHebeTimetable.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/hebe/VulcanHebeTimetable.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/hebe/VulcanHebeTimetable.kt index 99607fe8..48d06018 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/hebe/VulcanHebeTimetable.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/vulcan/data/hebe/VulcanHebeTimetable.kt @@ -119,7 +119,7 @@ class VulcanHebeTimetable( val startTime = lessonRange?.startTime val endTime = lessonRange?.endTime val teacherId = getTeacherId(json, "TeacherPrimary") - val classroom = json.getString("Room") + val classroom = json.getJsonObject("Room").getString("Code") val subjectId = getSubjectId(json, "Subject") val teamId = getTeamId(json, "Distribution") @@ -168,7 +168,7 @@ class VulcanHebeTimetable( val changeStartTime = changeLessonRange?.startTime val changeEndTime = changeLessonRange?.endTime val changeTeacherId = getTeacherId(changeJson, "TeacherPrimary") ?: teacherId - val changeClassroom = changeJson.getString("Room") ?: classroom + val changeClassroom = changeJson.getJsonObject("Room").getString("Code") ?: classroom val changeSubjectId = getSubjectId(changeJson, "Subject") ?: subjectId val changeTeamId = getTeamId(json, "Distribution")