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 category = info.child(4).text().trim()
|
||||
val description = info.ownText()
|
||||
val fullName = info.child(0).text().trim()
|
||||
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 teacher = data.getTeacher(teacherFirstName, teacherLastName)
|
||||
@ -98,7 +101,7 @@ class EdudziennikWebGrades(override val data: DataEdudziennik,
|
||||
val gradeObject = Grade(
|
||||
profileId,
|
||||
id,
|
||||
category,
|
||||
fullName,
|
||||
color,
|
||||
description,
|
||||
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.ENDPOINT_EDUDZIENNIK_WEB_LUCKY_NUMBER
|
||||
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.metadata.Metadata
|
||||
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, syncAt = nextSync)
|
||||
data.setSyncNext(ENDPOINT_EDUDZIENNIK_WEB_LUCKY_NUMBER, SYNC_ALWAYS)
|
||||
onSuccess()
|
||||
}
|
||||
} ?: onSuccess() }
|
||||
|
Loading…
x
Reference in New Issue
Block a user