forked from github/szkolny
[API/Edudziennik] Change grade categories and descriptions and change back lucky number sync frequency to always.
This commit is contained in:
parent
5dd6519d27
commit
1257596104
@ -76,8 +76,11 @@ class EdudziennikWebGrades(override val data: DataEdudziennik,
|
|||||||
}
|
}
|
||||||
|
|
||||||
val info = gradesInfo[index]
|
val info = gradesInfo[index]
|
||||||
val category = info.child(4).text().trim()
|
val fullName = info.child(0).text().trim()
|
||||||
val description = info.ownText()
|
val columnName = info.child(4).text().trim()
|
||||||
|
val comment = info.ownText()
|
||||||
|
|
||||||
|
val description = columnName + if (comment.isNotBlank()) " - $comment" else ""
|
||||||
|
|
||||||
val (teacherLastName, teacherFirstName) = info.child(1).text().split(' ')
|
val (teacherLastName, teacherFirstName) = info.child(1).text().split(' ')
|
||||||
val teacher = data.getTeacher(teacherFirstName, teacherLastName)
|
val teacher = data.getTeacher(teacherFirstName, teacherLastName)
|
||||||
@ -98,7 +101,7 @@ class EdudziennikWebGrades(override val data: DataEdudziennik,
|
|||||||
val gradeObject = Grade(
|
val gradeObject = Grade(
|
||||||
profileId,
|
profileId,
|
||||||
id,
|
id,
|
||||||
category,
|
fullName,
|
||||||
color,
|
color,
|
||||||
description,
|
description,
|
||||||
name,
|
name,
|
||||||
|
@ -7,6 +7,7 @@ package pl.szczodrzynski.edziennik.data.api.edziennik.edudziennik.data.web
|
|||||||
import pl.szczodrzynski.edziennik.data.api.edziennik.edudziennik.DataEdudziennik
|
import pl.szczodrzynski.edziennik.data.api.edziennik.edudziennik.DataEdudziennik
|
||||||
import pl.szczodrzynski.edziennik.data.api.edziennik.edudziennik.ENDPOINT_EDUDZIENNIK_WEB_LUCKY_NUMBER
|
import pl.szczodrzynski.edziennik.data.api.edziennik.edudziennik.ENDPOINT_EDUDZIENNIK_WEB_LUCKY_NUMBER
|
||||||
import pl.szczodrzynski.edziennik.data.api.edziennik.edudziennik.data.EdudziennikWeb
|
import pl.szczodrzynski.edziennik.data.api.edziennik.edudziennik.data.EdudziennikWeb
|
||||||
|
import pl.szczodrzynski.edziennik.data.db.modules.api.SYNC_ALWAYS
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.luckynumber.LuckyNumber
|
import pl.szczodrzynski.edziennik.data.db.modules.luckynumber.LuckyNumber
|
||||||
import pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata
|
import pl.szczodrzynski.edziennik.data.db.modules.metadata.Metadata
|
||||||
import pl.szczodrzynski.edziennik.utils.models.Date
|
import pl.szczodrzynski.edziennik.utils.models.Date
|
||||||
@ -37,9 +38,7 @@ class EdudziennikWebLuckyNumber(override val data: DataEdudziennik,
|
|||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
val nextSync = Date.getToday().stepForward(0, 0, 1).inMillis
|
data.setSyncNext(ENDPOINT_EDUDZIENNIK_WEB_LUCKY_NUMBER, SYNC_ALWAYS)
|
||||||
|
|
||||||
data.setSyncNext(ENDPOINT_EDUDZIENNIK_WEB_LUCKY_NUMBER, syncAt = nextSync)
|
|
||||||
onSuccess()
|
onSuccess()
|
||||||
}
|
}
|
||||||
} ?: onSuccess() }
|
} ?: onSuccess() }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user