forked from github/szkolny
[APIv2/Timetable] Add lesson change metadata only when the lesson is today or in the future
This commit is contained in:
parent
cd76f99bbf
commit
59fcb0a050
@ -153,7 +153,7 @@ class IdziennikWebTimetable(override val data: DataIdziennik,
|
|||||||
dates.add(lessonDate.value)
|
dates.add(lessonDate.value)
|
||||||
lessons.add(lessonObject)
|
lessons.add(lessonObject)
|
||||||
|
|
||||||
if (lessonObject.type != Lesson.TYPE_NORMAL) {
|
if (lessonObject.type != Lesson.TYPE_NORMAL && lessonDate >= Date.getToday()) {
|
||||||
data.metadataList.add(Metadata(
|
data.metadataList.add(Metadata(
|
||||||
profileId,
|
profileId,
|
||||||
Metadata.TYPE_LESSON_CHANGE,
|
Metadata.TYPE_LESSON_CHANGE,
|
||||||
|
@ -184,7 +184,7 @@ class LibrusApiTimetables(override val data: DataLibrus,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lessonObject.type != Lesson.TYPE_NORMAL) {
|
if (lessonObject.type != Lesson.TYPE_NORMAL && lessonDate >= Date.getToday()) {
|
||||||
data.metadataList.add(
|
data.metadataList.add(
|
||||||
Metadata(
|
Metadata(
|
||||||
data.profileId,
|
data.profileId,
|
||||||
|
@ -75,7 +75,7 @@ class MobidziennikApiTimetable(val data: DataMobidziennik, rows: List<String>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (it.type != Lesson.TYPE_NORMAL) {
|
if (it.type != Lesson.TYPE_NORMAL && date >= Date.getToday()) {
|
||||||
data.metadataList.add(
|
data.metadataList.add(
|
||||||
Metadata(
|
Metadata(
|
||||||
data.profileId,
|
data.profileId,
|
||||||
|
@ -172,7 +172,7 @@ class VulcanApiTimetable(override val data: DataVulcan, val onSuccess: () -> Uni
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type != Lesson.TYPE_NORMAL) {
|
if (type != Lesson.TYPE_NORMAL && lessonDate >= Date.getToday()) {
|
||||||
data.metadataList.add(Metadata(
|
data.metadataList.add(Metadata(
|
||||||
profileId,
|
profileId,
|
||||||
Metadata.TYPE_LESSON_CHANGE,
|
Metadata.TYPE_LESSON_CHANGE,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user