forked from github/szkolny
[API/Podlasie] Fix encoding in events topic.
This commit is contained in:
parent
795317f13f
commit
65ba330d5f
@ -22,8 +22,10 @@ class PodlasieApiEvents(val data: DataPodlasie, val rows: List<JsonObject>) {
|
||||
val date = event.getString("DateFrom")?.let { Date.fromY_m_d(it) } ?: return@forEach
|
||||
val time = event.getString("DateFrom")?.let { Time.fromY_m_d_H_m_s(it) }
|
||||
?: return@forEach
|
||||
|
||||
val name = event.getString("Name") ?: ""
|
||||
val description = event.getString("Description") ?: ""
|
||||
val topic = "$name\n\n$description".replace(""", "\"")
|
||||
|
||||
val type = when (event.getString("Category")?.toLowerCase(Locale.getDefault())) {
|
||||
"klasówka" -> Event.TYPE_EXAM
|
||||
@ -47,7 +49,7 @@ class PodlasieApiEvents(val data: DataPodlasie, val rows: List<JsonObject>) {
|
||||
id = id,
|
||||
date = date,
|
||||
time = time,
|
||||
topic = "$name\n\n$description",
|
||||
topic = topic,
|
||||
color = null,
|
||||
type = type,
|
||||
teacherId = teacher.id,
|
||||
|
Loading…
Reference in New Issue
Block a user