mirror of
https://github.com/szkolny-eu/szkolny-android.git
synced 2025-01-18 21:06:44 -06:00
[API/Podlasie] Move event description to homework body.
This commit is contained in:
parent
1fb5aaed5d
commit
f09f069b2c
@ -23,9 +23,8 @@ class PodlasieApiEvents(val data: DataPodlasie, val rows: List<JsonObject>) {
|
|||||||
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")?.replace(""", "\"") ?: ""
|
||||||
val description = event.getString("Description") ?: ""
|
val description = event.getString("Description")?.replace(""", "\"") ?: ""
|
||||||
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
|
||||||
@ -49,14 +48,16 @@ class PodlasieApiEvents(val data: DataPodlasie, val rows: List<JsonObject>) {
|
|||||||
id = id,
|
id = id,
|
||||||
date = date,
|
date = date,
|
||||||
time = time,
|
time = time,
|
||||||
topic = topic,
|
topic = name,
|
||||||
color = null,
|
color = null,
|
||||||
type = type,
|
type = type,
|
||||||
teacherId = teacher.id,
|
teacherId = teacher.id,
|
||||||
subjectId = lesson?.subjectId ?: -1,
|
subjectId = lesson?.subjectId ?: -1,
|
||||||
teamId = data.teamClass?.id ?: -1,
|
teamId = data.teamClass?.id ?: -1,
|
||||||
addedDate = addedDate
|
addedDate = addedDate
|
||||||
)
|
).apply {
|
||||||
|
homeworkBody = description
|
||||||
|
}
|
||||||
|
|
||||||
data.eventList.add(eventObject)
|
data.eventList.add(eventObject)
|
||||||
data.metadataList.add(
|
data.metadataList.add(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user