mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2024-11-24 19:04:38 -06:00
[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 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) }
|
val time = event.getString("DateFrom")?.let { Time.fromY_m_d_H_m_s(it) }
|
||||||
?: return@forEach
|
?: return@forEach
|
||||||
|
|
||||||
val name = event.getString("Name") ?: ""
|
val name = event.getString("Name") ?: ""
|
||||||
val description = event.getString("Description") ?: ""
|
val description = event.getString("Description") ?: ""
|
||||||
|
val topic = "$name\n\n$description".replace(""", "\"")
|
||||||
|
|
||||||
val type = when (event.getString("Category")?.toLowerCase(Locale.getDefault())) {
|
val type = when (event.getString("Category")?.toLowerCase(Locale.getDefault())) {
|
||||||
"klasówka" -> Event.TYPE_EXAM
|
"klasówka" -> Event.TYPE_EXAM
|
||||||
@ -47,7 +49,7 @@ class PodlasieApiEvents(val data: DataPodlasie, val rows: List<JsonObject>) {
|
|||||||
id = id,
|
id = id,
|
||||||
date = date,
|
date = date,
|
||||||
time = time,
|
time = time,
|
||||||
topic = "$name\n\n$description",
|
topic = topic,
|
||||||
color = null,
|
color = null,
|
||||||
type = type,
|
type = type,
|
||||||
teacherId = teacher.id,
|
teacherId = teacher.id,
|
||||||
|
Loading…
Reference in New Issue
Block a user