forked from github/szkolny
[API/Vulcan] Fix missing timetable entries. (#67)
This commit is contained in:
parent
cf4906f2f4
commit
b31bf5c1ab
@ -11,6 +11,7 @@ import pl.szczodrzynski.edziennik.data.api.VULCAN_HEBE_ENDPOINT_TIMETABLE_CHANGE
|
|||||||
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.DataVulcan
|
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.DataVulcan
|
||||||
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.ENDPOINT_VULCAN_HEBE_TIMETABLE
|
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.ENDPOINT_VULCAN_HEBE_TIMETABLE
|
||||||
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.data.VulcanHebe
|
import pl.szczodrzynski.edziennik.data.api.edziennik.vulcan.data.VulcanHebe
|
||||||
|
import pl.szczodrzynski.edziennik.data.api.models.DataRemoveModel
|
||||||
import pl.szczodrzynski.edziennik.data.db.entity.Lesson
|
import pl.szczodrzynski.edziennik.data.db.entity.Lesson
|
||||||
import pl.szczodrzynski.edziennik.data.db.entity.Lesson.Companion.TYPE_CANCELLED
|
import pl.szczodrzynski.edziennik.data.db.entity.Lesson.Companion.TYPE_CANCELLED
|
||||||
import pl.szczodrzynski.edziennik.data.db.entity.Lesson.Companion.TYPE_CHANGE
|
import pl.szczodrzynski.edziennik.data.db.entity.Lesson.Companion.TYPE_CHANGE
|
||||||
@ -47,7 +48,7 @@ class VulcanHebeTimetable(
|
|||||||
?: previousWeekStart
|
?: previousWeekStart
|
||||||
val dateTo = dateFrom.clone().stepForward(0, 0, 13)
|
val dateTo = dateFrom.clone().stepForward(0, 0, 13)
|
||||||
|
|
||||||
val lastSync = null
|
val lastSync = 0L
|
||||||
|
|
||||||
apiGetList(
|
apiGetList(
|
||||||
TAG,
|
TAG,
|
||||||
@ -106,6 +107,8 @@ class VulcanHebeTimetable(
|
|||||||
"Clearing lessons between ${dateFrom.stringY_m_d} and ${dateTo.stringY_m_d}"
|
"Clearing lessons between ${dateFrom.stringY_m_d} and ${dateTo.stringY_m_d}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
data.toRemove.add(DataRemoveModel.Timetable.between(dateFrom, dateTo))
|
||||||
|
|
||||||
data.lessonList.addAll(lessonList)
|
data.lessonList.addAll(lessonList)
|
||||||
|
|
||||||
data.setSyncNext(ENDPOINT_VULCAN_HEBE_TIMETABLE, SYNC_ALWAYS)
|
data.setSyncNext(ENDPOINT_VULCAN_HEBE_TIMETABLE, SYNC_ALWAYS)
|
||||||
|
Loading…
Reference in New Issue
Block a user