From c0d11c91e3c1f11a1b891d9ca56255c59aab0af6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Thu, 3 Sep 2020 23:51:56 +0200 Subject: [PATCH] [API/Mobidziennik] Fix trimming subject name in timetable. --- .../edziennik/mobidziennik/data/api/MobidziennikApiTimetable.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/mobidziennik/data/api/MobidziennikApiTimetable.kt b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/mobidziennik/data/api/MobidziennikApiTimetable.kt index a82ab4ef..aa07b1c3 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/mobidziennik/data/api/MobidziennikApiTimetable.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/data/api/edziennik/mobidziennik/data/api/MobidziennikApiTimetable.kt @@ -44,7 +44,7 @@ class MobidziennikApiTimetable(val data: DataMobidziennik, rows: List) { dataDays.remove(date.value) - val subjectId = data.subjectList.singleOrNull { it.longName == lesson[5] }?.id ?: -1 + val subjectId = data.subjectList.singleOrNull { it.longName == lesson[5].trim() }?.id ?: -1 val teacherId = data.teacherList.singleOrNull { it.fullNameLastFirst == (lesson[7]+" "+lesson[6]).fixName() }?.id ?: -1 val teamId = data.teamList.singleOrNull { it.name == lesson[8]+lesson[9] }?.id ?: -1 val classroom = lesson[11]